Hooray,
sorry to bother you...back on nasal coding.
I'm actually dealing with 3d-buttons on the EFB; currently I have a long list of buttons-objects in an .xml file, which are associated with the property 'keypress'.
Then, in the main efb.nas, I parse the actual 3d-buttons' pressing by that 'keypress' property with a conditional loop (keypress != "").
The whole stuff, using your words, is a "smell-code"
.
I have read on the Garmin196 Topic about 'event-listener', and I would ask you to clarify the issue.
First question: How to associate an 'event-listener' to an .ac object? Is this possible?
Could you suggest an existing example with 3d-objects and/or propose a code to be used as a guideline?
My aim is to completely eliminate the long list in the .xml file, if possible; and to try to handle the 24 3d-buttons (not canvas objects, but .ac objects) from nasal only.
Second question: can the 'event-listener' be turned on and off, and/or just select specific 3d-buttons to listen to (sometimes, I just need to parse two buttons)?
Sorry for asking, but the FgWiki is not really clear for a beginner...
Thanks for your patience,
I-NEMO