I’ve started converting a lot of duplicate timers on windows to global timers use AddHandler to set the Action event. However, if I use what I consider consistent style in the AddHandler line, it causes a Syntax error.
AddHandler(tmCloseStandbyDialog.Action, AddressOf mCloseStandabyDialog)
It took me quite a bit of sleuthing to recognize that the parenthesis were the problem and not something in my code. I understand parens being optional, but the cause of a syntax error??? :S
For AddHandler, yes. It used to be documented, including the reasoning. Can’t find it in the current docs.
Neither could I. The only reason I found the solution was by typing in the example verbatim and then realizing the difference between the example c ode and my code … not a productive way to spend a hectic morning.
AddHandler is not a function, but a key word!
And THAT makes perfect sense … >_< ??? Oh well, I got it sorted, but that really should be explicitly documented.
addhandler is another statement like IF and has its own permitted syntax
and that syntax does not permit ( ) around the arguments to it
and it is also a keyword (you cannot use it in any other context)