|
From: Anders G. <and...@gi...> - 2009-04-26 15:43:38
|
On Sun, 26 Apr 2009, Torsten Dreyer wrote: >> But I think it would be better to figure out why JSBSim didn't untie the >> property during the teardown phase and fix that rather than working around >> the problem in the subsequent constrution phase. > > Yeah - right. But I think that would also mean more work to do/implement. > The FGFDMExec destructor recursively unties all the properties > under /fdm/jsbsim. It is definitely not a good idea for FGFDMExec to untie > *all* properties from the root, so a list of properties that where tied is > needed. > > Let's leave this as a homework for Jon as soon as he is back from his camping > trip ;-) Good point. Another option would be to just add the rule "do not tie properties outside /fdm/jsbsim/" and perhaps enforce it in the code. I'm not sure that is desirable but it would somewhat reduce the possibilities of unexpected behaviour in the interaction with FlightGear. Btw, to just silently untie the property in the constructor would hide the error when the user has accidentally given the same property name to two components - I think that is a case where we would like JSBSim to give a warning (or even abort with an error). Cheers, Anders -- --------------------------------------------------------------------------- Anders Gidenstam WWW: http://www.gidenstam.org/FlightGear/ |