842
edits
(→setlistener(): testing indicated that this is the way it works.) |
Legoboyvdlp (talk | contribs) (→setlistener(): OOP and setlistener) |
||
Line 106: | Line 106: | ||
<syntaxhighlight lang="nasal"> | <syntaxhighlight lang="nasal"> | ||
myCallbackFunc([<changed_node> [, <listened_to_node> [, <operation> [, <is_child_event>]]]]) | myCallbackFunc([<changed_node> [, <listened_to_node> [, <operation> [, <is_child_event>]]]]) | ||
</syntaxhighlight> | |||
You cannot refer to OOP methods directly -- to do so, enclose the function call in a func() { } block as such: | |||
<syntaxhighlight lang="nasal"> | |||
signal.listener = setlistener(node, func() { me.phaseFunc(); }, 0, 0); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
edits