I have a timer (UpdateProgress_timer) in a window (myw) that starts via a pushbutton (Xojo 2018r3 Mac OS Desktop).
UpdateProgress_timer.Mode = Timer.ModeMultiple
I have created a property (w) of the window (myw) that is a reference to a new window created.
w = New HCFA_1500_window
The window where the timer exists remains open, the timer is a control within this window, however the timer sees this property (w) as Nil.
HCFA_1500_window(w) //is Nil
Is there a special way to pass properties of a window to a timer that belongs to that window? I thought since the timer was embedded within the window, it could see the properties of the window. It looks more like the timer is a whole separate being.
[quote=423508:@Greg O’Lone]
Was w being used for something else in that timer event?[/quote]
No. I was having trouble passing any property of the window to the timer. Using SELF fixed it.
Actually not sure why you think you need to pass the window to a control that is owned by that same window?
The control knows who its parent is… its PARENT is “SELF”, and it is “ME”
[quote=423516:@Dave S]Actually not sure why you think you need to pass the window to a control that is owned by that same window?
The control knows who its parent is… its PARENT is “SELF”, and it is “ME”[/quote]
The timer knew the property existed, it just couldn’t access its value. It should have known, it just didn’t. Pre-pending SELF to the property fixed that.