Forum Discussion
TechnoBill
14 years agoOccasional Contributor
OK I have isolated the problem we are having.
There appears to be something wrong with the waitWinFormsObject time out.
In the example show below, the object barBottomDockSite exists but the dockGlobalAssistant does not
if put a breakpoint on the line set w2=w1.waitWinFormsObject("dockGlobalAssistant",1000) and then execute the statement I can then see how long before it moves to the next line in debug mode.
I run the code, it quickly executes the previous statements and stops on the break point as expected on: set w2=w1.waitWinFormsObject("dockGlobalAssistant",1000)
I then press then key to execute that line and it waits about 20-30 seconds (waiting for winforms object("dockGlobalAssistant") ) before it goes to the next line. Also one thing I notice when we see this behaviour iss that the little progress bar that is shows when it is wating for an object does not progress. Depending on the value we put into the statement, the wait progress bar shows up partially populated but is not progressing.
if I change the value to anything <200 or so it seems to work OK and goes to the next line almost instantly but any values higher than that (300 or 400, etc that should still be well under 1 second wait), it waits at least 25 seconds.
Its as though its using some default timeout for values instead of the of the values I am specifying.
I have tried changing the Auto-wait timeout in the Default project properties to values ranging from 10 to 25000 and this makes no difference to this problem.
igCloseGlobalAssistant dw1,w2 sw1 = NSclp.frmCarelinkPlusMDI.waitWinFormsObject("barBottomDockSite",10000) w1.exists w2=w1.waitWinFormsObject("dockGlobalAssistant",1000) iw2.exists t ei
There appears to be something wrong with the waitWinFormsObject time out.
In the example show below, the object barBottomDockSite exists but the dockGlobalAssistant does not
if put a breakpoint on the line set w2=w1.waitWinFormsObject("dockGlobalAssistant",1000) and then execute the statement I can then see how long before it moves to the next line in debug mode.
I run the code, it quickly executes the previous statements and stops on the break point as expected on: set w2=w1.waitWinFormsObject("dockGlobalAssistant",1000)
I then press then key to execute that line and it waits about 20-30 seconds (waiting for winforms object("dockGlobalAssistant") ) before it goes to the next line. Also one thing I notice when we see this behaviour iss that the little progress bar that is shows when it is wating for an object does not progress. Depending on the value we put into the statement, the wait progress bar shows up partially populated but is not progressing.
if I change the value to anything <200 or so it seems to work OK and goes to the next line almost instantly but any values higher than that (300 or 400, etc that should still be well under 1 second wait), it waits at least 25 seconds.
Its as though its using some default timeout for values instead of the of the values I am specifying.
I have tried changing the Auto-wait timeout in the Default project properties to values ranging from 10 to 25000 and this makes no difference to this problem.
sub igCloseGlobalAssistant
dim w1,w2
set w1 = NameMapping.Sys.clp.frmCarelinkPlusMDI.waitWinFormsObject("barBottomDockSite",10000)
if w1.exists then
set w2=w1.waitWinFormsObject("dockGlobalAssistant",1000)
if w2.exists then
Log.Message("Closing Global Assistant")
call w2.click(10,10)
end if
end if
End Sub
igCloseGlobalAssistant dw1,w2 sw1 = NSclp.frmCarelinkPlusMDI.waitWinFormsObject("barBottomDockSite",10000) w1.exists w2=w1.waitWinFormsObject("dockGlobalAssistant",1000) iw2.exists t ei
Related Content
- 3 months agoeykxas
- 4 years agoCapricornus
- 6 years agoISR
- 6 years agoromanmfs