Melchior FRANZ wrote:
> I'd like to suggest to add the possibility to add a <nasal>
> init block to joystick *.xml files:

This sounds fine to me.

> but there's one questionable requirement: the "nasal" subsystem
> must get initialized before the "input" subsystem. And
> currently, a comment to the nasal initialization says: "Do this
> last, so that the loaded scripts see initialized state"
>
> Does "nasal" need to be the absolute last subsystem? "input"
> init would need it already, while "nasal" hardly needs "input"?

Well, no.  But the principle is that the initialization scripts want
to be able to see the "complete" property tree when they run.  If some
subsystem hasn't been initialized yet, then things get confusing.
Since input doesn't set many properties and just makes an alias for
the detected joystick(s), this is probably safe.

I think it might be cleaner, though, for the Nasal subsystem to
provide for a callback or "init script" that can be set by a caller.
Playing with the subsystem initialization order every time we want to
"nasalize" some part of startup seems like it might get messy.

Andy

_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to