1
0
Fork 0
Commit graph

17 commits

Author SHA1 Message Date
mfranz
b5f53c349f setAttribute("archive", 1) sets this attribute to "true", and
getAttribute("archive") returns 1 if the attribute is set, and 0 otherwise.

Allow to query and to set all properties by not specifying an attribute
string:  getAttribute() returns all attributes bit coded in an integer,
and setAttribute(attr) sets all attributes. No assumptions may be made
about the meaning of the bits -- they can be changed in future fgfs releases.
The only valid use is to compare or set attribute numbers obtained in the
same fgfs run. This is meant for allowing full copies of property branches.
Also add getAttribute query strings "children" for the number of children,
and "alias".
2007-04-04 14:42:38 +00:00
mfranz
4a79d82ba6 make attribute strings lowercase with hyphen instead of underscore;
this is consistent with their use as XML attributes
2007-01-14 13:58:15 +00:00
mfranz
d0bbe1f45d add getAttribute() and setAttribute() method 2007-01-12 18:00:56 +00:00
andy
3362ea2447 A bug was discovered on IRC where an errant script was setting a nil
value on a property.  This becomes a NaN when converted to a numeric
value, which then percolated into the C++ world where it ultimately
caused a crash in YASim's turbulence code.  While converting nil to
NaN isn't *strictly* wrong, it's dangerous for this reason.  Toss a
Nasal exception instead.  Hopefully this won't break too much
preexisting code.
2006-10-17 19:58:33 +00:00
andy
0c109dabbb More warnings, similar issues. 2006-08-08 18:32:17 +00:00
mfranz
e0b1d12a60 don't abort fgfs only because a nasal script called a property function
with an invalid path, as in getprop("/sim/model/737") or x.getNode("f:1").
Forward sg's error message to the Nasal runtime error function instead, so
you get something like:

  Nasal runtime error: name must begin with alpha or '_'
    at /home/m/fgfs/Base.local/Nasal/props.nas, line 30

Unfortunately, the location points to the line where the ghost wrapper
sits, rather than the offending script line.
2006-05-23 18:55:38 +00:00
fredb
36e4045810 Add missing include files needed by the new math code under windows 2006-02-18 13:58:09 +00:00
mfranz
0b136fa66b getChild(): add optional "create" flag (like in the c++ version) 2006-01-27 20:43:40 +00:00
mfranz
75877ebf43 ... and don't keep. This causes nasty, mysterious bugs and has no advantages. 2005-10-23 16:13:53 +00:00
mfranz
cad193a1c4 add support for removeChildren(): takes one name as optional argument
and removes all children with this name; if no name is given, removes
all children  (OK'ed by Andy)
2005-10-23 16:10:32 +00:00
andy
142854d3d1 Upgrade to Nasal 1.0 test candidate 2005-04-18 19:49:13 +00:00
ehofman
def25f39d5 gcc 4.0 fixes. 2004-12-18 11:59:33 +00:00
curt
2acdd02879 Clean up various compiler warnings that have crept into the code. This
by no means get's them all, but it's a start.
2004-04-01 15:27:53 +00:00
andy
2166dd70a8 Forgot to implment the Node.getChild(name, index) form of the function 2003-12-29 22:52:21 +00:00
andy
7edecf980e Workaround for code generation bug in gcc-2.95.3 2003-12-16 05:39:04 +00:00
andy
0b3159ec0c Add a new command, "dialog-new", allowing external code (e.g. Nasal
scripts) to create dialogs at runtime.  Augment "dialog-close" to take
a name argument, allowing code other than PUI callbacks to close
dialogs.

The changes to the GUI directory to enable this are actually minor,
basically amounting to using SGPropertyNode_ptr reference counting
(the GUI subsystem no longer "controls" the dialog property trees, so
it can't delete them).
2003-12-08 02:05:10 +00:00
ehofman
79e48829da Add Nasal Vs. 1.5 2003-12-01 14:35:49 +00:00