S shashkiranr Active Member Licensed User Longtime User Nov 4, 2012 #1 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
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 Nov 4, 2012 #2 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
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?
Erel B4X founder Staff member Licensed User Longtime User Nov 4, 2012 #3 Please use [ code ] [ /code ] tags (without spaces) when posting code. Make sure to declare the timers as process global variables. Upvote 0
Please use [ code ] [ /code ] tags (without spaces) when posting code. Make sure to declare the timers as process global variables.
S shashkiranr Active Member Licensed User Longtime User Nov 5, 2012 #4 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
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