Using listeners and signals with Nasal: Difference between revisions

Jump to navigation Jump to search
m
m (documenting that listeners are called with the target prop node as the first argument)
Line 31: Line 31:


== Listeners and Signals ==
== Listeners and Signals ==
The important thing to keep in mind is that custom listeners are generally not about loading or running Nasal files, most of the Nasal files are loaded and executed implictly during startup. Only the Nasal sub modules (i.e. inside their own [[$FG_ROOT]]/Nasal/ directory) are dynamically loaded using a listener). So listeners are really just a simple way to talk to the property tree:
The important thing to keep in mind is that custom listeners are generally not about loading or running Nasal files, most of the Nasal files are loaded and executed implicitly during startup. Only the Nasal sub modules (i.e. inside their own [[$FG_ROOT]]/Nasal/ directory) are dynamically loaded using a listener). So listeners are really just a simple way to talk to the property tree:
'''Hey property tree, would you please be so kind to call this Nasal function whenever this property is modified?'''
'''Hey property tree, would you please be so kind to call this Nasal function whenever this property is modified?'''


546

edits

Navigation menu