On Sunday 19 June 2011 17:55:25 Hal V. Engel wrote:
> On Sunday, June 19, 2011 02:15:54 PM Ron Jensen wrote:
> > http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg302
> >08 .html gui.menuBind("radio", "dialogs.Radio.open()");
>
> Thanks I knew I saw something about this on the list but I coundn't find
> the emails that covered it.   When I try to use it it fails when I click on
> the menu item.
>
> Here is my code:
>
> var radio = gui.Dialog.new("sim/gui/dialogs/SCR-522C/dialog",
>                              
> "Aircraft/Instruments-3d/SCR-522C/Dialogs/radios.xml");
> gui.menuBind("radio", "dialogs.radio.open()");
>
> When I select Equipment --> Radios I get the following error message in the
> console:
>
> Nasal runtime error: undefined symbol: dialogs at
> /sim/bindings/menu/bindings[35], line 1
>
> I must be doing something wrong but I don't see what it is.  Can anyone
> here spot my error?
>
> Hal

In the example case you are running in the namespace "dialogs" so, in the 
setfile you would have:
<nasal>
 <dialogs>
   <file>mynasal.nas

If you have something different, you need something different...
Assuming you load the nasal in this block:
  <nasal>
    <p51d>
      <file>Aircraft/p51d/Nasal/over-ride-flaps.nas</file>
      <file>Aircraft/p51d/Nasal/stores.nas</file>
      <file>Aircraft/p51d/Nasal/limits.nas</file>
      <file>Aircraft/p51d/Nasal/engine-start.nas</file>
      <file>Aircraft/p51d/Nasal/sputter.nas</file>
      <file>Aircraft/p51d/Nasal/climbrate.nas</file>
      <file>Aircraft/p51d/Nasal/gear-doors.nas</file>
      <file>Aircraft/p51d/Nasal/gear-lever.nas</file>
    </p51d>
  </nasal> 

gui.menuBind("radio", "p51d.radio.open()");

Ron

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to