[Flightgear-devel] Re: [PATCH] [BUG] fix a NASAL error when the WB dialog is open w/jsbsim
Following Andy's and Melchior's comments, here is a shorter patch with more user-friendly text displayed. Please apply, V. Index: ../data/Nasal/gui.nas === RCS file: /var/cvs/FlightGear-0.9/data/Nasal/gui.nas,v retrieving revision 1.10 diff -u -r1.10 gui.nas --- ../data/Nasal/gui.nas 13 Jul 2005 11:30:32 - 1.10 +++ ../data/Nasal/gui.nas 18 Oct 2005 20:02:20 - @@ -132,6 +132,20 @@ header = dialog[name].addChild(text); header.set(label, title); +dialog[name].addChild(hrule).set(pref-height, 2); + +if (props.globals.getNode(/yasim) == nil) { +msg = dialog[name].addChild(text); +msg.set(label, Not supported for this aircraft); +cancel = dialog[name].addChild(button); +cancel.set(legend, Cancel); +cancel.prop().getNode(binding[0]/command, 1).setValue(dialog-close); +fgcommand(dialog-new, dialog[name].prop()); +showDialog(name); +return; +} + + contentArea = dialog[name].addChild(group); contentArea.set(layout, hbox); ___ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
[Flightgear-devel] Re: [PATCH] [BUG] fix a NASAL error when the WB dialog is open w/jsbsim
* Vassilii Khachaturov -- Saturday 15 October 2005 21:28: The default aircraft behaviour on the menu WB dialog command is to report a NASAL error on the STDERR of flightgear, with no reaction in the game window. Included is a patch that pops up a dialog instead, explaining why that wouldn't work. Greying the menu entry out would have been even better, but I don't think that's currently possible. m. ___ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
[Flightgear-devel] Re: [PATCH] [BUG] fix a NASAL error when the WB dialog is open w/jsbsim
The length is due to the diff inability to say that a lot of lines were just indented right (as they were put inside an else {} ) (To verify that quickly, try applying the diff locally and do a cvs diff -bu which then would ignore everything except the substantial change.) BTW, is there a way to create an XML condition w/o NASAL code equivalent to + if (props.globals.getNode(/yasim) == nil) { checking that a particular node is present in the property grove? (Not for this particular example, but for my general education.) V. ___ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
[Flightgear-devel] Re: [PATCH] [BUG] fix a NASAL error when the WB dialog is open w/jsbsim
* Andy Ross -- Sunday 16 October 2005 19:32: YASim is the only FDM that reads those properties, Which *does* make it a YASim-only dialog. Not for you and me, maybe, but for those who will have to live a *very* long time with 0.9.9. Just that those don't know why it sometimes works, and sometimes not. This patch, IMHO, provides a disincentive for the JSBSim folks to implement this feature as it explicitly cuts them off from the dialog for testing. Oh, sure. Just like it did for one, two years now. Just present the 0.9.9 users a menu entry that silently fails. This will surely convince the JSBSim people. :- m. ___ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
[Flightgear-devel] Re: [PATCH] [BUG] fix a NASAL error when the WB dialog is open w/jsbsim
What about this: in the 0.9.9 release we pop up a dialog that says: Not implemented for this type of aircraft. And after the release: *Still* not implemented in JSBSim!. ;-) m. ___ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d