Andy Ross writes:
>
>Norman Vine wrote:
> > Grrrr......
> > One of those variables that only lives in the 'ether world'
> > A VERY GOOD REASON for these things to live in a real 'C'
> > variable ......
>
>I think you misunderstood.  It *does* live in a real C variable
>(FGInterface::Tank1Fuel).  

Ackk.. you are right I only grepped the 'C" source ....

>The core points here are:
>
>1. Not every FDM or every aircraft model will set all properties.

Easy enough to just set everything to 0 or its equivalent in the
class constructor !

>2. There is no way for clients of the information to know, a priori,
>    whether or not a value is valid or not (starting up a "generic jet"
>    panel on the 172, etc...).
>3. Reading information that the FDM hasn't set shouldn't cause a crash.

Agreed, but... Programming under Linux is much more forgiving then
some other enviroments and I realize it is hard for those who only develop 
for it.

>That's very hard to guarantee in C space, as this bug evidences.  With
>a soft-coded property system, you get it for free.

No the problem is that everyone is trying to make a scripting
language out of XML, something that it wasn't really designed
to do and so we end up we all of these global settors in 'C' 
filling up the property tree that don't match up 'name wise' with 
their 'C' variable name hence making these kind of ommisions
invariable.   Now if we had an automated tool to parse the 
C Classes and automatically create teh property tree that would
be another story... 

>There's also a tangential advantage, which is that it makes evolution
>of the interface much easier.  

As I often say I am all for high level language but ...

>Now, at some point we'll want to "canonize" this property and move it
>out of the /yasim tree and into the core.  But now, that can happen
>_after_ the development has been done, instead of having to be
>designed-in beforehand.

The way I see things developing this is leading to chaos.  
All global functors with anything able to call anything 
else with a bit of XML and no easy way to get at things from 'C"

There isn't even much similarity between the 'C" Object tree
and the 'property tree' .. UCK

Anyway ..... 
I have a feeling there is 'code fork' coming....

FYI
I have temporarily placed a MingW32 compiled version
of todays CVS files at 
http://www.vso.cape.com/~nhv/files/fgfs/fgfs.exe.gz
This is completely unsupported but should just work
on any Win32 platform as is with todays BASE CVS files
< 1.26 meg >

This has Andy's latest changes (YASim 1.3)  
and the Fuel Tanks are initialized empty so make
sure you top her off before takeoff

Norman  


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to