mfranz
80ed641d69
avoid unnecessary call()
2008-02-13 20:12:42 +00:00
andy
4ae206fc00
Turns out some code likes to call isa() with non-objects. Might as
...
well have it return false (which is valid) instead of throwing an
exception (also valid, but more surprising).
2008-02-07 21:23:42 +00:00
andy
bedac8ec83
Fix isa() when used on classes with superclasses.
2008-02-07 18:03:03 +00:00
mfranz
ecf469e295
prop-key-handler.nas: check for nil property
...
tutorial.nas, globals.nas, controls.nas: cosmetics
2007-11-20 17:02:13 +00:00
mfranz
b3ab26db07
fix comment & cosmetics
2007-11-06 21:23:53 +00:00
mfranz
fc6f357a0e
add new debugging function proptrace(), which outputs all regular property
...
writes (not directly written tied ones), all node additions and removal.
Frames are separated with a line. Turn off ANSI coloring if you want to
pipe the results into a file: --prop:sim/startup/terminal-ansi-colors=0
2007-10-16 15:24:30 +00:00
mfranz
256b1880cb
wrapNode(): One argument ought to be enough for anybody.
2007-10-15 18:32:20 +00:00
mfranz
2bcddab9b6
setlistener(): accessing the node via cmdarg() is now depreciated. Use
...
a regular function argument for that. Note the "n" in this example:
setlistener("/sim/current-view/view-number", func(n) {
setprop("/sim/hud/visibility", !n.getValue());
}, 1);
2007-10-15 18:27:42 +00:00
mfranz
12c11dfa6f
setlistener(): now that we know the params, we only need to unwrap the first two
2007-10-15 18:00:17 +00:00
mfranz
0d3c7cec6f
- setlistener(): add wrapper function to turn ghost arguments into props.Nodes
...
- "modernization": use more named function arguments and "var" keywords
2007-10-15 16:30:37 +00:00
mfranz
705e4bcaac
forward fourth setlistener() arg to _setlistener()
2007-10-14 18:03:31 +00:00
mfranz
dfd21c722d
- add more "var" keywords, fix indentation, drop some parentheses,
...
fix comments, consistency fixes, ...
- aircraft.nas: angular_lowpass -> minor speedup
2007-10-07 15:12:05 +00:00
mfranz
bf050c012f
load and execute all ~/.fgfs/Nasal/*.nas files in alphabetic order after
...
the $FG_ROOT/Nasal/*.nas ones are done. This allows to use props.Node etc.
immediately, without requirement for settimer(func{}, 0) constructions.
Rationale:
- clean separation of local additions (and hacks :-) from standard files
- users might not have write permission to $FG_ROOT/Nasal/ or shouldn't
have to su to root for writing Nasal code
2007-08-06 22:50:06 +00:00
mfranz
cfd9c1b48f
pointless spelling fixes
2007-06-22 18:49:38 +00:00
andy
30502189d8
The screen-capture command no longer pops up a dialog, so toss up a tip
...
from within the F3 keybaord handler instead.
2007-06-07 16:59:07 +00:00
mfranz
1e446a26ae
setlistener(): don't drop calls with invalid property -- the c++ side
...
outputs a nice error message in this case
2007-04-27 15:52:54 +00:00
mfranz
944e6a8548
in debug levels "debug" and "bulk" output listener id, file name, and
...
line-number for every setlistener() wrapper call. This allows to identify
listeners later by their id.
2007-04-27 14:27:01 +00:00
mfranz
5f7104ac8a
revert condition() patch. This can as easily be done in pure Nasal.
2007-03-18 10:52:08 +00:00
mfranz
d1c4bcea85
condition(property) wrapper for the _condition function.
...
See $FG_ROOT/Docs/README.condition
2007-03-17 15:59:39 +00:00
mfranz
cde64c8543
use __ for static variables (one underscore is too handy for use in other
...
modules to waste it here)
2006-02-18 00:12:09 +00:00
mfranz
dc6ab58eaf
allow printlog() to be used with variable arg list (like print()):
...
printlog("warn", "Monty", "Burns");
2006-02-17 22:05:32 +00:00
mfranz
003ae0986f
add printlog() function that works like SG_LOG(). It takes two arguments:
...
a --log-level and a scalar. Example: printlog("info", "I want more noise");
2006-02-17 21:24:08 +00:00
mfranz
714504b548
support optional setlistener() arg to fire callback function initially;
...
copy arg checking from interpolate()
2006-01-30 12:37:34 +00:00
mfranz
523b81e317
globals.nas: add _setlistener wrapper (needs to be used in INIT style
...
functions when used in $FG_ROOT/Nasal/*.nas, because it
depends on props.nas being available; no restrictions in
aircraft files, where it will proof most useful
gui.nas: replace inefficient FPS display polling loop with listener
callback
2005-12-16 19:15:08 +00:00
andy
f1c70da6d4
Fix interpolate() so that interpolate("/prop/name") freezes the
...
interpolation at the current value. This was always a feature of the
C++ code, but the Nasal wrapper couldn't handle the empty argument
list.
2005-06-29 23:58:58 +00:00
andy
57eea1be61
Melchior needs an equivalent of Perl's defined() function to test for
...
double-initialization of joystick blocks. So here it is.
2005-06-12 18:17:00 +00:00
andy
3677b96fad
Bugfix to globals.fgcommand().
...
New Node.setValues() method which sets whole property trees from Nasal
data.
A view.nas module, which takes over handling of the X/x zoom keys. It
clamps the FOV to a dynamically calculated maximum corresponding to
typical human visual accuity, and pops up a pretty dialog informing
you of the new FOV.
2003-12-08 02:09:19 +00:00
andy
5ed2c89605
Add abs() and interpolate() to globals. Move bo105 code to the -set.xml file
2003-12-05 02:38:35 +00:00
ehofman
0be80148c3
Add Nasal Vs. 1.5
2003-12-01 14:36:22 +00:00