when timer is disabled, the tick event continues

shashkiranr

Active Member
Licensed User
Longtime User
Hi,

There is a senario where im incrementing a value in the timer tick event.


When the video is playing i hide the processdialog(which is working) and i disable the timer tt.enabled = false, even after this the event tt_tick continues to run and x gets incremented as shown below.

How do you stop the tick event?


here is the code

Activity.AddView(vv, 0, 0, 100%x, 100%y)
Log(Activity.GetView(0))
vv.LoadVideo("http",url)
vv.Play
ProgressDialogShow("Please wait...")
tt.Enabled = True


Sub tt_Tick
Log(tt.Interval)
If x = 200 Then
ChangeURl
End If
If vv.IsPlaying = True Then
ProgressDialogHide
tt.Enabled = False
Log(tt.Enabled)
End If
End Sub


Sub changeURL
.....some code...
End sub


Thank you for your suggestions :)
SK
 

mc73

Well-Known Member
Licensed User
Longtime User
I guess X is incremented in the chageURL sub. Can you post this procedure. And also, does the log(tt.enabled) returns 'false' as expected if the timer gets realy disabled?
 
Upvote 0

shashkiranr

Active Member
Licensed User
Longtime User
Thanks Erel :) tat was the mistake i had initialized the timer in the wrong place :( and yes of course i will use code tags next time i post the code :)
 
Upvote 0
Top