jmcwhinney
12 years agoContributor
.FindChild( will not refresh cached copy of object.
I cant seem to get .FindChild to find my object directly below it.
I have tried the following:
MyObject.FindChild("JavaFullClassName","javax.swing.JViewport");
MyObject.FindChild("JavaFullClassName","javax.swing.JViewport",1,true);
and neither of them work.
However, if I first try to iterate the children objects and look at their classname, then it does work afterwards... (see below)
DisplayComponents(MyObject);
MyObject.FindChild("JavaFullClassName","javax.swing.JViewport");
function DisplayComponents(TheObject){
var TheComponents = TheObject.getComponents();
for (var i = 0; i < TheComponents.length; i++) {
if(TheComponents.Items(i) != null){
if(TheComponents.Items(i).getClass() != null){
var ClassName = TheComponents.Items(i).getClass().toString();
}
}
}
}
I have tried the following:
MyObject.FindChild("JavaFullClassName","javax.swing.JViewport");
MyObject.FindChild("JavaFullClassName","javax.swing.JViewport",1,true);
and neither of them work.
However, if I first try to iterate the children objects and look at their classname, then it does work afterwards... (see below)
DisplayComponents(MyObject);
MyObject.FindChild("JavaFullClassName","javax.swing.JViewport");
function DisplayComponents(TheObject){
var TheComponents = TheObject.getComponents();
for (var i = 0; i < TheComponents.length; i++) {
if(TheComponents.Items(i) != null){
if(TheComponents.Items(i).getClass() != null){
var ClassName = TheComponents.Items(i).getClass().toString();
}
}
}
}