Hi,
> * Tatsuhiro Nishioka -- Saturday 15 November 2008:
>> I got an nasal error
>
> Error reports are always nicer when they contain error messages.
>
My bad, I guess I sent it before copy-and-paste the error.
Here's the error I got:
Nasal runtime error: non-objects have no members
at
/Users/tat/work/Xcode/FlightGear/svn/trunk/FlightGearOSX/build/Deployment/FlightGear.app/Contents/Resources/data/Nasal/gui.nas,
line 102
On Nov 16, 2008, at 4:51 AM, Melchior FRANZ wrote:
>> props.globals.getNode("/sim/tutorials").getChildren("tutorial")));
> [...]
>> This line should be called when fdm-initialized is raised.
>
> If it didn't exist at nasal-dir-initialized time, then it will
> likely not exist at fdm-initialized time either, as it's something
> that's plugged into the property tree very early, long before
> the Nasal module is even initialized. The cause is most likely
> that I forgot the "1" in ...getNode("/sim/tutorials", 1)....
The node does exist at fgm-initialized since it is created by tutorial.nas when
nasal-dir-initialized is raised.
Here's the excerpt of tutorial.nas:
_setlistener("/sim/signals/nasal-dir-initialized", func {
markerN = props.globals.getNode("/sim/model/marker", 1);
headingN = props.globals.getNode("/orientation/heading-deg", 1);
slipN = props.globals.getNode("/orientation/side-slip-deg", 1);
time_elapsedN = props.globals.getNode("/sim/time/elapsed-sec", 1);
last_messageN = props.globals.getNode("/sim/tutorials/last-message", 1);
step_countN = props.globals.getNode("/sim/tutorials/step-count", 1);
step_timeN = props.globals.getNode("/sim/tutorials/step-time", 1);
setlistener("/sim/crashed", stopTutorial);
});
But your way also works, and it may be safer since it is just the matter of the
order of function invocation.
And... I found you already fixed gui.nas.
Thanks!
Tat
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel