cancel
Showing results for 
Search instead for 
Did you mean: 

RefreshMappingInfo() not working

Highlighted
Valued Contributor

RefreshMappingInfo() not working

My application is written in delphi.
when i run below code gets error "Python runtime error.
RuntimeError: 0x847ceed2" in Log.Message(childtab.Text) line...

by debugging found that RefreshMappingInfo() did not working
the code is below..

def closeAll(self):
 tabCount = Aliases.App.Browser.MDIClient.ChildCount
 for i in range (0,tabCount):
   Aliases.App.Browser.MDIClient.RefreshMappingInfo()
   Delay(5000,"Waiting everything to be refreshed...................")
   childtab = Aliases.App.Browser.MDIClient.Child(0)
   Log.Message(childtab.Text)
   childtab.close()


while debugging , when go to object browser ..could see deleted tab is there even though RefreshMappingInfo() runs.

So child(0) still refers to closed tab

 

when RMB and manually refreshed mapping infor, script runs correctly.

always first tab is closed correctly problem starts subsequent tabs .

any ideas..?

2 REPLIES 2
Community Hero

Re: RefreshMappingInfo() not working

This is likely a timeing issue. I would suggest doing something along the lines of WaitAliasChild to wait for the tab to not exist.


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Valued Contributor

Re: RefreshMappingInfo() not working

No use Waited for around a one and half minute...... Smiley Frustrated