Duplex TRACE inside function

Hi there,

I’m trying to start working with duplex, I’ve follow https://forum.renoise.com/t/how-to-create-a-new-duplex-application/32662

and now trying to use the TRACE function defined in Global.lua in my application script, and have notice a weird behavior, TRACE function (in my script) works outside functions but not inside methods like __init(), here’s my script:

--[[/*============================================================================
-- Duplex.Application.SCLMetro 
Inheritance: @{Duplex.Application} > Duplex.Application.SCLMetro 
============================================================================*/]]--
-- // SCL test file

class 'SCLMetro' (Application)

SCLMetro.default_options = {}

-- // only this call works as expected :/
TRACE("SCLMetro:in root()")

function SCLMetro:__init(display, mappings, options, config_name)
  -- // this one is never called
  TRACE("SCLMetro:init()")
  self.mapping = {
    toggle = {
      description = "SCLMetro: toggle on/off"
    }
  }
  Application.__init(self, display, mappings, options, config_name)
end

function SCLMetro:start_app()
  if not Application.start_app(self) then
    return
  end
  self.update()
end

function SCLMetro:_build_app()

  local c = UIToggleButton(self.display)
  c.group_name = self.mappings.toggle.group_name
  c.set_pos(self.mapping.toggle.index)

  c.on_change = function(obj)
    -- // this one is never called
    TRACE("SCLMetro:inon_change()")
    if not self.active then
      return false
    end
    renoise.song().transport.metronome_enabled = obj.active
  end

  self:_add_component(c)
  self._toggle = c
  return true
end

function SCLMetro:update()
  -- // this one is never called too :/
  TRACE("SCLMetro:update()")
  if self._toggle then
    self._toggle:set(renoise.song().transport.metronome_enabled)
  end
end

@danoise: have you already meet this behavior? do you know how to fix this?

My bad… I’ve wrongly configured my device configuration file, sorry

@danoise: thanks for all your incredible works :wink: