Howto:Prototyping a new NavDisplay Style: Difference between revisions

Jump to navigation Jump to search
m (→‎Objective: not so simple anymore)
Line 59: Line 59:
Now, what is taking place internally is that dialogs may not only contain the known XML markup, but may also contain embedded Nasal code blocks.
Now, what is taking place internally is that dialogs may not only contain the known XML markup, but may also contain embedded Nasal code blocks.
There are really only two main ways to embed such code: at the dialog-level using nasal/open tags for code that is executed prior to showing a dialog that is already loaded from disk, and nasal/load blocks loaded per Canvas widget (the black area showing the ND texture).
There are really only two main ways to embed such code: at the dialog-level using nasal/open tags for code that is executed prior to showing a dialog that is already loaded from disk, and nasal/load blocks loaded per Canvas widget (the black area showing the ND texture).
To be fair, there also is a nasal/close tag to do some housekeeping/cleanup.
To be fair, there also is a nasal/close tag to do some housekeeping/cleanup (as well as arbitrary Nasal in bindings).
Anyway, what is so powerful about Nasal embedded in dialog files is that the code is typically executed prior to the creation/display of the dialog, and the Nasal code gets a handle to the property tree representation of the dialog markup (processed aready by the XML parser).
Anyway, what is so powerful about Nasal embedded in dialog files is that the code is typically executed prior to the creation/display of the dialog, and the Nasal code gets a handle to the property tree representation of the dialog markup (processed aready by the XML parser).


Navigation menu