NisHera
10 years agoValued Contributor
Fails searching object in intermediate parent
Have a window mapped up to Aliases.MyApp.frmBrowser.MDIClient.CalenderMonth
In run time I have to get the field object
Aliases.MyApp.frmBrowser.MDIClient.CalenderMonth.VCLObject("pnlMain").VCLObject("pnlRecords").VCLObject("pnlPages").VCLObject("pgMainNoteBook").VCLObject("pgThresholds").VCLObject("grpThresholds").VCLObject("fldETPLowRate")
So I tryed following
var propArr = new Array('ObjectIdentifier','Visible'); var valuArr = new Array('pgThresholds','True' ); ThresholdPG =Aliases.MyApp.frmBrowser.MDIClient.CalenderMonth.FindEx(propArr,valuArr,10,true,2500); myObject = ThresholdPG.FindChildEx('ObjectIdentifier','fldETPLowRate',12,true,2000);
eventhough ThresholdPG identified by TC, in run time always it failed to get myObject.
But if I drill down with objectspy to myObject it works after that.
I change my code as follows and start working smoothly....
CalenderMonth =Aliases.MyApp.frmBrowser.MDIClient.CalenderMonth; myObject = CalenderMonth.FindChildEx('ObjectIdentifier','fldETPLowRate',12,true,2000);
Question is why dose it fails while searching with intermediate object but success with parent?
I'm using TC11.3