Skip to content

Init Argument#17

Open
TheWisker wants to merge 2 commits intoandOrlando:mainfrom
TheWisker:main
Open

Init Argument#17
TheWisker wants to merge 2 commits intoandOrlando:mainfrom
TheWisker:main

Conversation

@TheWisker
Copy link

I changed the behavior a little by making rubato.timed only execute the subscribed function on object creation (initially) when the init argument is passed to it. In my case this was necessary as some objects used in the subscribed function where only defined just before setting rubato.timed.target thus when the subscribed function was executed prematurely an error was thrown as those objects were always nil at that time. Thanks for this awesome library!

@andOrlando
Copy link
Owner

andOrlando commented Jul 1, 2024

Thanks for the pr! After remembering what the code I wrote years ago did, I think subscribe_callback was supposed to be an init param.

Do you think instead of init being a bool you could do subscribe_callback, which defaults to what it is now?

then you can simply set subscribed_callback = function() end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants