1
0
Fork 0

let initNode() initialize a property to double(0) by default

This commit is contained in:
mfranz 2008-06-04 20:41:44 +00:00
parent 64296a8d4a
commit 238fce1d15

View file

@ -254,7 +254,7 @@ var nodeList = func {
# "BOOL"). If it is omitted, then "DOUBLE" is used for numbers, and STRING
# for everything else. Returns the property as props.Node.
#
var initNode = func(prop, value, type = nil) {
var initNode = func(prop, value = 0, type = nil) {
if(!isa(prop, props.Node)) prop = props.globals.getNode(prop, 1);
if(prop.getType() != "NONE") value = prop.getValue();
if(type == nil) prop.setValue(value);