On Thu, Feb 11, 2010 at 10:59 PM, John Denker <j...@av8n.com> wrote: > > On my machine I observe that the various scripts in > the Nasal/ directory get loaded in some hard-to-predict > order. > > That means that if you write a script called foo.nas, > it's hard to know whether it will get processed before > or after math.nas and/or props.nas. > > So the question is, what to do if foo.nas wants to make > use of the features provided by the other scripts? > > I know about the trick of using settimer(stuff, 0).
The usual trick is to attach a listener to /sim/signals/nasal-dir-initialized. Also, you can load nasal modules dynamically, such as: if (!contains(globals, "MPCarriersNW")) { io.load_nasal(getprop("/sim/fg-root") ~ "/Aircraft/MPCarrier/Systems/mp-network.nas", "MPCarriersNW"); -- Csaba/Jester ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel