Timer in Window not seeing property

  1. 7 months ago

    David S

    2 Feb 2019 Pre-Release Testers, Xojo Pro

    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.

  2. Dave S

    2 Feb 2019 San Diego, California USA

    try SELF

  3. David S

    2 Feb 2019 Pre-Release Testers, Xojo Pro

    @Dave S try SELF

    Looks like that was it. Thanks.

  4. Was w being used for something else in that timer event?

  5. David S

    2 Feb 2019 Pre-Release Testers, Xojo Pro

    @Greg OLone Was w being used for something else in that timer event?

    No. I was having trouble passing any property of the window to the timer. Using SELF fixed it.

  6. Dave S

    2 Feb 2019 San Diego, California USA

    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"

  7. @Dave S its PARENT is "SELF", and it is "ME"

    Wow... take that statement out of context and someone might think you were quoting Sigmund Freud. :P

  8. David S

    3 Feb 2019 Pre-Release Testers, Xojo Pro

    @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"

    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.

  9. Dave S

    3 Feb 2019 San Diego, California USA

    @Greg OLone Wow... take that statement out of context and someone might think you were quoting Sigmund Freud. :P

    LOL... yeah I guess you're right....

or Sign Up to reply!