@@ -69,9 +69,28 @@ TestCase {
72− // Find an object with the given name recursively, starting
72+ // Find an object with the given name in the children tree of "obj"
73− // at the given object "obj"
74 function findChild(obj,objectName) {
73 function findChild(obj,objectName) {
74+ var childs = new Array(0);
76+ while (childs.length > 0) {
77+ if (childs[0].objectName == objectName) {
80+ for (var i in childs[0].children) {
81+ childs.push(childs[0].children[i])
88+ // Find an object with the given name in the children tree of "obj"
89+ // Including invisible children like animations, timers etc.
90+ // Note: you should use findChild if you're not sure you need this
91+ // as this tree is much bigger and might contain stuff that goes
93+ function findInvisibleChild(obj,objectName) {
75 var childs = new Array(0);
94 var childs = new Array(0);
76 childs.push(obj)
95 childs.push(obj)
77 while (childs.length > 0) {
96 while (childs.length > 0) {