var geodinfo=func(lat,lon){ return [nil,{ names:["Road","Freeway"] }]; } var props= { globals:nil, Node:nil, getNode:func(path,index) { path=split('/',path); var tmp=me.globals; var path_size=size(path); for(var i=0;i0) { if(contains(tmp.val,path[i]~'['~index~']')) return tmp.val[path[i]~'['~index~']']; else return tmp.val[path[i]]; } return tmp; } }; props.Node= { new:func(values=nil) { var result={ parents:[props.Node], val:{}, type:'GHOST', parent:nil }; if(typeof(values)=="hash") result.val=values; return result; }, addChild:func(name) { if(!contains(me.val,name)) { me.val[name]=props.Node.new(); me.val[name].parent=me; return 1; } return 0; }, addChildren:func(name,cnt=0) { for(var i=0;itutorial'); props.getNode('/test/in',3).setValue('/',2147483648); props.getNode("/sim",1).addChild("messages"); props.getNode("/sim/messages",1).addChild("copilot"); props.getNode("/position",1).addChild("latitude-deg"); props.getNode("/position",1).addChild("longitude-deg"); props.getNode("/orientation",1).addChild("heading-deg"); props.getNode("/controls",1).addChild("flight"); props.getNode("/controls/flight",1).addChild("rudder"); props.getNode("/sim/messages/copilot",1).setValue('/',"nothing"); props.getNode("/position/latitude-deg",1).setValue('/',90); props.getNode("/position/longitude-deg",1).setValue('/',90); props.getNode("/orientation/heading-deg",1).setValue('/',90); props.getNode("/controls/flight/rudder",1).setValue('/',0.114); props.globals.debug(); println("-----------------------------------");