Modules.nas: Difference between revisions

Jump to navigation Jump to search
Reload mechanism changed to fgcommand
(Reload mechanism changed to fgcommand)
Line 57: Line 57:
</syntaxhighlight>
</syntaxhighlight>


==== Menu item for reloading ====
Now add a menu item for easy reloading like this:
Now add a menu item for easy reloading like this:
{{note|The module name in the property path must match the name passed to <code>modules.Module.new()</code>}}
{{caution|The reload mechanism has been changed to fgcommand, the reload property used in the pre-release has been removed.
The advantage is you just need to know the module name but not any complicated property path or Nasal namespace.}}
{{note|The module name passed to the fgcommand must match the name passed to <code>modules.Module.new()</code>}}
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<menubar>
<menubar>
Line 70: Line 73:
                 <label>Reload EFIS</label>
                 <label>Reload EFIS</label>
                 <binding>
                 <binding>
                     <command>property-assign</command>
                     <command>nasal-module-reload</command>
                     <property>/nasal/modules/myAircraft_EFIS/reload</property>
                     <module>myAircraft_EFIS</module>
                    <value>1</value>
                 </binding>
                 </binding>
             </item>
             </item>
252

edits

Navigation menu