Hi all, I have been doing some coding and using the property manager in flightgear but i want to know what is the right way to do it.
I use the method "fgGetNode("/path/to/property", true)" to get an existing property or create one if not there. There are a few things i want to know that i list below: 1) A node that is used in the flight system also results in the method "isTied" failing and the It does allow me to tie this already existing property to a variable?!? Is this the expected behavior? Isn't the property supposed to be tied to a variable somewhere already? 2) When a property did not previously exist, is it necessary to create a variable and tie the node to that variable? I find the system to be working either ways. If i do not tie it, the property is displayed as "double" in the property browser else it displays the data type that it has been tied to. 3) When the property has been explicitly tied, no matter what the value is initialized to using the "setDoubleValue" method the property browser shows the value as zero. This display of zero does not happen when the property is not tied explicitly. 4) I would also like to add a change listener to the class that i have written so that the class is informed as and when a variable being watched has changed value. I believe the way to do this is to use the "SGPropertyChangeListener" class as a base class and implement the "valueChanged" method to do the job. Is this correct? So now, back to my question. What is the right way to use the property manager? Which are the right methods that are to be used and in what sequence? -- Cheers! Kitts _______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d