Flying toaster wrote in Tue Sep 10, 2013 4:28 pm:Check just the post above ... right below the screenshot ...
Thank you
Flying toaster wrote in Tue Sep 10, 2013 4:28 pm:Check just the post above ... right below the screenshot ...
Flying toaster wrote in Mon Sep 09, 2013 9:00 pm:Bad news : the loadout menu is broken. Using the del() method on the window destroys the off-screen canvas (since it is attached to no texture) so I tried to work around that ... to no avail.
TheTom wrote in Fri Sep 13, 2013 10:43 am:You can eg. just do: canvas.addPlacement({"type": "ref"});)
Flying toaster wrote in Sat Sep 14, 2013 6:09 pm:TheTom wrote in Fri Sep 13, 2013 10:43 am:You can eg. just do: canvas.addPlacement({"type": "ref"});)
Thanks, that did the trick ! I didn't realise I could increase the reference count that way... I must admit the very lax object model of nasal is a mystery to a dinosaur like me
the comment about nasal is that you would have a hard time creating such an object "out of thin air" and get away with it in a strongly typed language (say C++, Ada, Pascal, even Java I think
var foo = {"type": "ref"};
canvas.addPlacement(foo);
foo( new bar() );
<file>Nasal/canvas/api.nas</file>
<file>Nasal/canvas/PropertyElement.nas</file>
<file>Nasal/canvas/gui.nas</file>
No path in sim/sound/path
Could not find at least one of the following objects for animation: 'Slat1'
Could not find at least one of the following objects for animation: 'Slat1.001'
Could not find at least one of the following objects for animation: 'Slat2'
Could not find at least one of the following objects for animation: 'Slat2'
Could not find at least one of the following objects for animation: 'LoSpdBrk', 'LoSpdBrkJack1', 'LoSpdBrkJack2', 'LoSpdBrkJack11', 'LoSpdBrkJack22'
Could not find at least one of the following objects for animation: 'CanopyInside'
environment init
Animated jetways ... initialized
Nasal runtime error: undefined symbol: DefaultStyle
at /Users/philosopher/Documents/FlightGear/fgdata/Nasal/canvas/gui.nas, line 16
parsesvg: skipping unknown element 'defs'
parsesvg: skipping unknown element 'sodipodi:namedview'
parsesvg: skipping unknown element 'sodipodi:guide'
parsesvg: skipping unknown element 'sodipodi:guide'
parsesvg: skipping unknown element 'sodipodi:guide'
parsesvg: skipping unknown element 'sodipodi:guide'
parsesvg: skipping unknown element 'sodipodi:guide'
parsesvg: skipping unknown element 'sodipodi:guide'
parsesvg: skipping unknown element 'sodipodi:guide'
parsesvg: skipping unknown element 'metadata'
Initializing Liveries
Nasal runtime error: method called on object of wrong type: is 'unknown' expected 'canvas.Window'
at /Users/philosopher/Documents/FlightGear/fgdata/Nasal/canvas/gui.nas, line 224
called from: /Users/philosopher/Documents/FlightGear/fgdata/Nasal/canvas/gui.nas, line 181
called from: /Users/philosopher/Documents/FlightGear/fgdata/Nasal/canvas/gui.nas, line 165
called from: /Users/philosopher/Documents/FlightGear/fgdata/Nasal/canvas/gui.nas, line 65
called from: /Users/philosopher/Documents/FlightGear/fgdata/Aircraft/F-20/Nasal/GUI/stores.nas, line 71
called from: , line 1
Flying toaster wrote in Mon Sep 16, 2013 9:08 pm:Thanks for the heads up, I'll remove it next time. It actually was needed for previous releases, but I guess that's what you get when you use bleeding edge code.
Thanks also for the comments too
Hooray wrote in Tue Sep 17, 2013 12:15 pm:right, around ~2.8 I think - meanwhile, it's no longer necessary, and actually problematic ... I don't know if we still have any tutorials suggesting this ??
Users browsing this forum: No registered users and 16 guests