20,741
edits
Line 23: | Line 23: | ||
=== Namespace and Menu entry === | === Namespace and Menu entry === | ||
The dialog is set-up like a normal nasal namespace in the -set file: | The dialog is set-up like a normal nasal namespace in the -set file: | ||
<syntaxhighlight lang="xml"> | |||
<nasal> | |||
<Dialogs> | <Dialogs> | ||
<file>Aircraft/extra500/Dialogs/failuredialog.nas</file> | <file>Aircraft/extra500/Dialogs/failuredialog.nas</file> | ||
</Dialogs> | </Dialogs> | ||
</nasal> | |||
</syntaxhighlight> | |||
And called (opened) though a menu entry in /Dialogs/extra500-menu.xml just like any other classical menu entry. | And called (opened) though a menu entry in /Dialogs/extra500-menu.xml just like any other classical menu entry. | ||
<syntaxhighlight lang="xml"> | |||
<item> | |||
<name>Failure-dialog</name> | <name>Failure-dialog</name> | ||
<label>Failure Dialog</label> | <label>Failure Dialog</label> | ||
Line 39: | Line 42: | ||
]]></script> | ]]></script> | ||
</binding> | </binding> | ||
</item> | |||
</syntaxhighlight> | |||
This means there needs to be a loaded Class called "Failuredialog" in the namespace "Dialogs" with an internal function called "openDialog". | This means there needs to be a loaded Class called "Failuredialog" in the namespace "Dialogs" with an internal function called "openDialog". |