Hal,

 

Works nicely here - I've just pushed an update into the TR1133.nas file 

 

This is the line:

 

    gui.menuBind("radio", "TR1133.radio_dlg.open()");

 

You should be able to adapt that to the SC-522

 

Vivian

 

-----Original Message-----
From: Hal V. Engel [mailto:hven...@gmail.com] 
Sent: 20 June 2011 00:55
To: flightgear-devel@lists.sourceforge.net
Subject: Re: [Flightgear-devel] Nasal updating properties in the menu

 

On Sunday, June 19, 2011 02:15:54 PM Ron Jensen wrote:

> On Sunday 19 June 2011 15:04:11 Hal V. Engel wrote:

> > I need to over ride one of the default menu items so that I can use a

> > custom menu. After some effort I have figured out what needs to be

> > changed

> > 

> > in the property tree. The code looks like this:

> > # Disable the menu item "Equipment > radio" so we use our own gui.

> > 

> > gui.menuEnable("radio",0);

> > 

> > # override default radio menu

> > setprop("sim/bindings/menu/binding[35]/dialog-name", "SCR-522C-radio");

> > setprop("sim/menubar/default/menu[5]/item[3]/binding/dialog-name",

> > 

> > "SCR-522C-radio");

> > 

> > setprop("sim/menubar/default/menu[5]/item[3"]/name", "SCR-522C-radio");

> > 

> > gui.menuEnable("SCR-522C-radio",1);

> > 

> > And this is working. But I am concerned that if the menus should be

> > changed (IE. items added or removed) that this would no longer be
correct

> > and the code will start failing. Is that true? If so ithere a better

> > way to do this sort of thing?

> > 

> > Hal

> 

>
http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg30208

> .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 sysbol: 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

 

 

> 

>
---------------------------------------------------------------------------

> --- 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

 

------------------------------------------------------------------------------
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