On Sun, 19 Jun 2011, 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? > I would REALLY suggest the use of named constants instead of hard-coded values.
g. -- Proud owner of F-15C 80-0007 http://www.f15sim.com - The only one of its kind. http://www.simpits.org/geneb - The Me-109F/X Project Some people collect things for a hobby. Geeks collect hobbies. ScarletDME - The red hot Data Management Environment A Multi-Value database for the masses, not the classes. http://www.scarletdme.org - Get it _today_! Political correctness is a doctrine, fostered by a delusional, illogical minority, and rabidly promoted by an unscrupulous mainstream media, which holds forth the proposition that it is entirely possible to pick up a turd by the clean end. ------------------------------------------------------------------------------ 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