[wxPython-users] event binding broken?

Raffaello Barella barbarossa.platz at gmail.com
Wed Jan 23 04:03:50 PST 2008


Ach, wunderbar. I had not realized that the event EVT_CLOSE occurs anyway.
Thanks.

2008/1/22, Robin Dunn <robin at alldunn.com>:
>
> Raffaello Barella wrote:
> > My bug was searched, found and destroyed, and I gather the solution of
> > this tiny drama may be of some interest for the forum.
> > I use to keep trace of the last position of my frames, to recover it at
> > the next opening.
> > Since this frame can be closed by the wx.CLOSE_BOX , a button and a
> > menu, I thought it would have been particularly bright to bind the three
> > events (EVT_CLOSE, EVT_MENU and EVT_MENU)  to the same method. Well, it
> > wasn't: none of those events ever arrived to the method.
> > The working solution I found is to bind each event to a different
> > function, which in turn will call the one function that actually stores
> > the frame's position.
> > If something more elegant can be suggested, I'll oblige.
> >
>
> The way I would do it is that the menu events would just call
> frame.Close() and then the handler for the actual closing of the window
> would be bound with the EVT_CLOSE event.
>
>
> --
> Robin Dunn
> Software Craftsman
> http://wxPython.org  Java give you jitters?  Relax with wxPython!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200801=
23/af43f4f7/attachment.htm


More information about the wxpython-users mailing list