add getParent & getPath
This commit is contained in:
parent
1c40cca673
commit
2e8208a752
12
props.nas
12
props.nas
|
@ -102,6 +102,15 @@ props.Node=
|
||||||
return k;
|
return k;
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
|
getParent:func()
|
||||||
|
{
|
||||||
|
return me.parent;
|
||||||
|
},
|
||||||
|
getPath:func()
|
||||||
|
{
|
||||||
|
if(me.parent==nil) return '';
|
||||||
|
return me.parent.getPath()~'/'~me.getName();
|
||||||
|
},
|
||||||
equals:func(node){return me==node;},
|
equals:func(node){return me==node;},
|
||||||
debug:func(s='')
|
debug:func(s='')
|
||||||
{
|
{
|
||||||
|
@ -139,4 +148,5 @@ props.getNode('/test/in',0).setValue('/','true');
|
||||||
props.getNode('/test/in',1).setValue('/','false');
|
props.getNode('/test/in',1).setValue('/','false');
|
||||||
props.getNode('/test/in',2).setValue('/','welcome aboard,need help? use help->tutorial');
|
props.getNode('/test/in',2).setValue('/','welcome aboard,need help? use help->tutorial');
|
||||||
props.getNode('/test/in',3).setValue('/',2147483648);
|
props.getNode('/test/in',3).setValue('/',2147483648);
|
||||||
props.globals.debug();
|
props.globals.debug();
|
||||||
|
println(props.getNode('/test/in',3).getPath());
|
Loading…
Reference in New Issue