From: Jon B. <js...@ha...> - 2005-09-06 13:53:44
|
> The property system lets you add a property when it gets referenced but > it's not yet available, do you use that functionality at this time? > > SGPropertyNode *n = getNode("/path/to/node", true); > > The last parameter orders the code to create the property if non existent. > > Erik Yeah, that's a good and useful capability in some cases. What I want to try to do with JSBSim, though, is to avoid the use of that capability unless it's absolutely necessary. In my opinion, using that feature within the flight control system might allow a typo to get through, and leave the user wondering why things don't work as expected. So, requiring a property to exist prior to referring to it, I think, tends to act as a sort of a syntax check. Regardless, JSBSim should better handle the situation where a non-existent property is referenced. Right now I think JSBSim segfaults. That's not good, of course. Jon |