20,741
edits
(→Procedurally created/updated PUI dialogs: new section) |
(→Extending namespaces: new section) |
||
Line 595: | Line 595: | ||
[[File:FlightGear 2.7 - Joystick information 01.png|thumb|FlightGear PUI dialog showing joystick information]] | [[File:FlightGear 2.7 - Joystick information 01.png|thumb|FlightGear PUI dialog showing joystick information]] | ||
[[File:YZZzz7K.png|thumb|Screenshot showing [[PUI]] joystick configuration dialog]] | [[File:YZZzz7K.png|thumb|Screenshot showing [[PUI]] joystick configuration dialog]] | ||
== Extending namespaces == | |||
<syntaxhighlight lang="nasal"> | |||
var code1 = "var self = 100;"; | |||
var code2 = "print(self);"; | |||
var codeObj1 = compile(code1); | |||
var codeObj2 = compile(code2); | |||
var locals = {}; | |||
var result1 = call(codeObj1,[],nil,locals ); | |||
# debug.dump(locals ); | |||
call(codeObj2, [], nil, locals); | |||
</syntaxhighlight> |