On Mon, Sep 22, 2008 at 8:05 AM, Geoff wrote:

> 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).
> >
>
> Having googled for answers for days and not gotten much pertinent
> information, let me restate my problem and question.
>
> I add to the FG menu a selection for "Underway" which is my "addon".
> When this menu item is selected a dialog pops up.  One of the items in
> the dialog is, for instance, an input field where the user needs to
> enter an IP address.  I would like to a) put a default value in the
> input field and b) obviously be able to read the value when the user
> ok's the dialog.  The IP address would be *my* variable and not a
> FlightGear variable.
>
> Is this possible?  Is there an example of how to do this?


I am 99.9% sure that if you make up a new variable name in the property
system and reference it from your dialog, it will be automatically created.
The property system is designed so a referenced property name will be
automatically created if it doesn't exist yet.  You just have to be aware
that the variable isn't necessarily created when FlightGear first starts up,
it is created when it is first referenced (which might be when the dialog
box is opened.)

Regards,

Curt.
-- 
Curtis Olson: http://baron.flightgear.org/~curt/
-------------------------------------------------------------------------
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

Reply via email to