Hello
Back with another basic question. First is there some documentation that explains timers? Maybe I am missing the documentation pile.
In VB6 you create a timer, set its interval and when you enable it, it will fire after the preset interval. It will keep firing at that interval until you disable the timer.
In B4X I create a timer and I initialize it and it fires immediately before I enable it. I check in the sub used in the initialization and verify that it was not enabled. I said ok I can work with I will just return from the sub if the timer is not enabled. It then appears to not return to the sub after the preset interval. So, obviously I need someone to explain B4X timers. I am sorry to be asking for help on such a basic topic but I have not found the documentation that explains B4X timers.
Thanks for educating m.
Here is my sample code. It jumps to Sequence70Timer_Tick sub as soon as the timer is initialized. Then it returns back to the enable line. It appears not to fire again.
tmrF70Sequence.Enabled=False
tmrF70Sequence.Initialize(SequenceF70Timer_Tick,2500)
tmrF70Sequence.Enabled=True
Private Sub SequenceF70Timer_Tick
Log("Sequence F70 Timer= " & tmrF70Sequence.Enabled)
If tmrF70Sequence.Enabled=False Then Return
Back with another basic question. First is there some documentation that explains timers? Maybe I am missing the documentation pile.
In VB6 you create a timer, set its interval and when you enable it, it will fire after the preset interval. It will keep firing at that interval until you disable the timer.
In B4X I create a timer and I initialize it and it fires immediately before I enable it. I check in the sub used in the initialization and verify that it was not enabled. I said ok I can work with I will just return from the sub if the timer is not enabled. It then appears to not return to the sub after the preset interval. So, obviously I need someone to explain B4X timers. I am sorry to be asking for help on such a basic topic but I have not found the documentation that explains B4X timers.
Thanks for educating m.
Here is my sample code. It jumps to Sequence70Timer_Tick sub as soon as the timer is initialized. Then it returns back to the enable line. It appears not to fire again.
tmrF70Sequence.Enabled=False
tmrF70Sequence.Initialize(SequenceF70Timer_Tick,2500)
tmrF70Sequence.Enabled=True
Private Sub SequenceF70Timer_Tick
Log("Sequence F70 Timer= " & tmrF70Sequence.Enabled)
If tmrF70Sequence.Enabled=False Then Return