Other "Protected routine" or "Timer1.IsEnabled"

LucaMs

Expert
Licensed User
Longtime User
Very bad title, but, on the other hand, the remaining text of this post will be... worse :D
[P.S. changed titile]

I should write this in "Bugs & Wishlist" but it is not a "normal wish".

An our friend (you know, I never have technical problems
upload_2016-6-13_14-6-53.png
) uses many timers in an Activity.
To create a function to check if one of them is enabled (in his case, when he's writing a file), to check if those timers can be "the bug" of his project, I suggested to keep updating a "map of timers"...

Uhm... while I'm writing, I'm thinking to another "Wish", but let's go on. ***

In these cases it would be useful to have a routine that can not be interrupted by other events.
I mean something like:

Private Protected Sub RoutineName

(where Protected has nothing to do with the same attribute of other languages).



*** But, while writing, I thought that in the our friend's case, he needs only a new property of Timers: IsEnabled.


P.S. perhaps it would be useful to have a "NotDoEvents" :confused:

Damn, I will receive a: "Please, start a new thread..." or, worse, without "Please" :p:
Timer1.Pause - Timer1.Continue would be also very useful.
 
Last edited:

lemonisdead

Well-Known Member
Licensed User
Longtime User
Timer1.Enabled= (true or false) is not sufficient ? I don't get it

For large projects requiring more than two timers, I do now use one only with a small Interval and test if the time has reached a certain value at ticks
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Timer1.Enabled= (true or false) is not sufficient ? I don't get it

No, it isn't. That setting enable or disable the timer, "I" need to suspend the timer, or "lock" the routine code to "protect" it from other events.

To debug only, IsEnabled could be enough. In other cases, Timer1.Pause and Timer1.Continue could be very useful.


Thank you, lemon
 
Upvote 0
Top