* Curtis L. Olson -- Friday 04 March 2005 05:33:
> When configuring a 2d instrument, there is a concept of property 
> aliases.  The README.xmlpanel example uses absolute property paths, but 
> the real world instruments I've seen use relative paths with a lot of 
> ../../../../../params/etc.

You just count all hierarchy levels back to the <params> level (whereby
the name "params" is not hardcoded, and you can use anything else there,
as long as it doesn't clash with existing keywords like "animation").


<!-- ### parameter section ### -->

                <B trace-read="true">456</B>


<!-- ### animation section ### -->

                        <value alias="../../../params/A"/>

                        <L3>          <!-- L4-L3-L2-L1 -->


Note the the level of the node that defines the alias ("value" and L4) is
also to be counted when backing out, and demands an extra "../". Of course
this is much easier with sane tab indentation, instead of braindead and
impolite one-space indents.  :-P

> Are there any tricks to debugging parameter aliases to make sure you are 
> pointing to the right thing?  

Nothing special, I guess. But you could always set the node's "trace-read"
property (see simgear/props/props_io.cxx:191) I hope this wasn't too confusing. 


Flightgear-devel mailing list

Reply via email to