When to use bind, EVT_***, and connect.

63q2o4i02 at sneakemail.com 63q2o4i02 at sneakemail.com
Wed Aug 16 11:15:25 PDT 2006


> > it).  Can someone explain briefly when to use bind, connect, and
> > EVT_xxx()?  I think they are just style preferences because they all
> > seem to do the same thing.
>
> They do.  Originally we had the EVT_xxx functions to mimic the EVT_xxx
> macros in C++.  They were all simple wrappers around the Connect method.
>     A couple years ago I converted the EVT_xxx functions into instances
> of the wx.PyEventBinder class and added the Bind method.  They work
> together to make binding events a little more object oriented, and a
> little more easier to work with.  It still wraps the Connect method, but
> just has a few more layers around it.  The binder objects are still
> callable as functions for backwards compatibility, but that is not the
> recommended usage any more.
> 

Cool, thanks, I get it. :)







More information about the wx-users mailing list