Geoff, On Thu, 2008-09-18 at 16:45 -0400, Geoff wrote: > Hello all - > > I have added a menu item to the Environment which brings up a dialog > with some data fields for the user to fill in. > > My question is: what do I do when the <property> field doesn't exist? > How do I create a new one and where can I find out what ones are > available. (The README.properties is sadly lacking).
You can create new properties in a few different ways: - You can declare a property in a model xml file. - You can declare and define an initial value in the xml -set file for your aircraft (ship/car) - You can declare, define and even keep them updated in the JSBSim flight dynamics xml file. - You can declare, define and alter properties from nasal scripting. This is a fragment from the c182rg-set.xml: <controls> ... <gear> <gear-handle-down type="int">1</gear-handle-down> </gear> </controls> It declares a integer property called /controls/gear/gear-handle-down and defines the initial value to be "1" This is a fragment from the kap140.nas autopilot script: var locks = "/autopilot/KAP140/locks"; (...) # locks var propLocks = props.globals.getNode(locks, 1); var lockAltHold = propLocks.getNode("alt-hold", 1); The "1" argument to .getNode() causes it to create the property if it doesn't exist. > On a similar theme - so I don't have to keep asking such simple > questions, is there a central (or not) area where developer how-tos or > explanations of the way things work is located? There's the wiki, can't say how good it is... I learned before it was written, and while I know it exists I rarely look at it... http://wiki.flightgear.org/index.php/Portal:Developer Ron ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel