while working on my tool, i guess i stumbled over a bug in the API again.
when i try to use renoise.tool().add_timer(), i get an error message with code that used to work.
example code:
local func = function() print("timer triggered") end
renoise.tool().add_timer(func, 10)
error message:
*** No matching overload found, candidates:
*** void add_timer(ScriptingTool&,luabind::object const&,custom [double])
*** stack traceback:
*** [C]: in function 'add_timer'
*** main.lua:2: in main chunk
cheers.
EDIT: typo in test snippet and a different mistake led me to confusion. sorry. false alarm.
i am really embarrassed! duh! it’s not the first time. i thought i got used to the colon. it’s a mistake, but what actually made me think there is a problem, is not the typo in the code snippet i posted, but with code related to this function:
-- calls a function once after x ms
function call_by_timer(func, ms)
local hook = nil
hook = function()
func()
renoise.tool():remove_timer(hook)
end
renoise.tool():add_timer(hook, ms)
end
as you can see, minded the !colon! but it was actually another problem that caused the same error messsage. so actually two different mistakes lead to the same error message. anyway, sorry for the false alarm. it works as expected and i am embarrassed as crap, once again.