Window.Close()

  1. 2 weeks ago

    Peter W

    is not verified Nov 28 Pre-Release Testers, Xojo Pro

    Picking up Xojo again after being a long time away from it. So I think this qualifies as a noob question.

    I try to add a close event to a window, but do not see the event listed in the IDE. Manually adding it, it does not fire when the window closes.
    I try to add a close event to the app, and I see it. And it works.

    I tried this with a brand new project as well. What am I missing? I should probably read the documentation somewhat better, but I don't see it. Really.

    For future reference:
    -image-

  2. Greg O

    Nov 28 Xojo Inc

    Make sure you added a Close Event and not a Method or an Event Definition.

  3. Peter W

    is not verified Nov 28 Pre-Release Testers, Xojo Pro

    O yeah. I went wrong there by adding a method. Thanks for pointing me at an obvious mistake.
    I finally was able to make things work by adding an event to the app, and then copying the event inside the window. That seems like the wrong way to do it, to get the right result.
    I wonder why the Close and CancelClose event handlers are not available from the list when you want to add an event handler to a window. Again, thanks for your help so far. Stupid mistake.

  4. Sascha S

    Nov 28 Pre-Release Testers, Xojo Pro Answer Germany

    For future reference:
    -image-

  5. Peter W

    is not verified Nov 28 Pre-Release Testers, Xojo Pro

    !@#$%. The list was scrolled down, and I didn't see that. Thanks guys.

or Sign Up to reply!