I am trying to make sure I understand how the timer functions in the new framework work.
to that End i created a class
[code]Class Test
Sub Constructor(theVal as String)
StrVal = theVal
End sub
Sub Action()
System.DebugLog StrVal
End Sub
property StrVal As String
End Class[/code]
Then in open event of the Default window I put:
[code]Sub Open()
DIm A1 as New Test(“A1”)
Dim A2 as new test(“A2”)
xojo.Core.Timer.CallLater(100, AddressOf A1.Action)
xojo.Core.Timer.CallLater(100, AddressOf A2.Action)
xojo.Core.Timer.CancelCall( AddressOf A1.Action)
End Sub
[/code]
When I run i get an Xojo.Core.iteratorExecption…
Why?
When I comment out the CancelCall line I get “A1” and “A2” in teh debug log so one CAN have more that one timer active with teh same method…
- karen