You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases it might be more efficient to use Conditions/triggers, but
closures should be the default choice for callbacks.
On Sep 16, 2015 7:47 PM, "Cokemonkey11" [email protected] wrote:
Okay, so what's the best way to execute callback functions in Wurst?
—
Reply to this email directly or view it on GitHub #154 (comment).
Activity
Frotty commentedon Sep 3, 2013
Or a code variable
peq commentedon Sep 7, 2013
But code variable only works with function references, not with normal calls.
implemented #154 remove cyclic dependencies between functions
Cokemonkey11 commentedon Sep 15, 2015
@peq is there documentation somewhere that explains how to use this?
There is no information about limitations of
ExecuteFuncin the Wurst manual.peq commentedon Sep 16, 2015
ExecuteFunc can only be used with static strings. It is statically checked whether the function exists.
For cyclic dependencies between functions you don't have to do anything, it just works and you can look at the compiled output to see how.
Cokemonkey11 commentedon Sep 16, 2015
Okay, so what's the best way to execute callback functions in Wurst?
peq commentedon Sep 16, 2015
I think objects/closures work best:
http://peq.github.io/WurstScript/manual.html#lambda-expressions-and-closures
In some cases it might be more efficient to use Conditions/triggers, but
closures should be the default choice for callbacks.
On Sep 16, 2015 7:47 PM, "Cokemonkey11" [email protected] wrote: