Struck with blindness? (Cannot set a timer.action)

I don’t know if that’s a bug in Xojo Editor on Mac or if I suffer from some kind of over-coding.

I just copied a piece of code I use a few times throughout my project, set up a public property “DelayRTimer” as Timer in the same window this method sits in, and trying to compile

DelayRTimer = new Timer DelayRTimer.Period = 1000 AddHandler DelayRTimer.Action, AddressOf PhoneRectangleRefresh DelayRTimer.Mode = 1

gives me a Type mismatch error each time: Expected Delegate (Timer), but got Delegate ( )

PhonerectangleRefresh resides as a public method inside the window as well.

Must be doing something very stupid, it seems, but I cannot find the mistake I made. Any ideas?

Make sure PhoneRectangleRefresh is defined like this:

Sub PhoneRectangleRefreh (theTimer as Timer)

EventHandlers pass in a pointer to the instance that they run on.

Thx. Should be taking a break, I guess. (Phew)