Curtis L. Olson wrote:
> Is there any documentation that explains how the nasal scripting
> system is integrated into FlightGear?  I looked a bit, and can't
> find anything.

Sure:

  http://plausible.org/nasal/flightgear.html

This should probably move to the FlightGear site, I suppose.

> If I decide I want to call a nasal script from someplace in the
> code, how do I go about doing that?  Do I create an entirely new
> parser and call it?  Is the global parser good enough, can I just
> pass a script to it?  What about the existing scripts, how are they
> found and launched?  I'm not seeing how it all goes together.

This is pretty much covered on that page.  The files in the Nasal
directory of the base package are read and executed at the end of
boot.  Stuff in fg-command bindings is parsed and executed when the
binding fires.  Properties under /nasal are read during initialization
and can contain either literal code or point to files to load.  And
there are C++ APIs from which you can turn a string into a
"FGNasalScript" object with a call() method which can be invoked at
runtime.

Andy

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

Reply via email to