ShowModalWithin

I did:

  Self.close
  [b]Self[/b].ShowModalWithin (wHome)

and got a crash in the Mac. But,

  Self.close
  [b]wLogon[/b].ShowModalWithin (wHome)

works…

I think when you called the Close method of Self, that destroyed the wLogon window. So, Self is probably Nil (or otherwise invalid) and you crash on the next line. This is assuming that wLogon is an implicitly instantiated window.

But a Self. should not always work ? I thought it was just an “easy” way to call the window itself.

I’m not sure. My understanding is that “Self”, “Me”, etc. are backed by the actual object they represent, and that their behavior is undefined if the object is destroyed.

Thanks Andrew.

Calling wLogon creates a new instance. Use Self.Hide instead of Self.Close to dismiss without destroying.

Thanks Tom.