[wxPython-users] Re: question

Rich Shepard rshepard at appl-ecosys.com
Wed Nov 15 08:34:06 PST 2006


On Wed, 15 Nov 2006, John Salerno wrote:

> Will this work? I think you need to do this:
> self.Bind(wx.EVT_BUTTON, self.Solve, self.bsolve)

   I used to bind methods to widgets this way, but now I write them like
this:

   butWidget.Bind(wx.EVT_BUTTON, self.OnSolve)

   I find it much easier to scan code and find the event handler bindings
this way, and I can move the bindings together because they're identified by
the instance name of the widget.

YMMV,

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.(TM)    |            Accelerator
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863




More information about the wxpython-users mailing list