'Mark Summerfield' via wxPython-users wrote:
> I'm just starting out learning Phoenix.
>
> At the moment I'm using this model:
> ...
> This means that no matter if the user clicks File->Quit, or presses
> Ctrl+Q (which wx seems to give me for free), or clicks the window's X
> close button, the OnClose method is called. So the code works. My
> question is, is this the correct way to do it?
Yes, that's all pretty normal. You want your close actions to all
result in an EVT_CLOSE event, which should route to a single function
where you do your clean up and call Destroy.
The only minor picky quibble I might make is that the menuQuit handler
should probably call self.Close, which would then trigger the onClose
handler, but that's an extremely minor religious point that would not
make a difference except in extreme circumstances.
--
Tim Roberts,
ti...@probo.com
Providenza & Boekelheide, Inc.