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