Which style of event binding to use?

Dear Users,

Duing my use and learning of wxPython I've come across two different
styles of event binding and would like two know which of the following
is the 'prefered' option.

self.Cancel.Bind(wx.EVT_BUTTON, self.OnCancel,id=self.CANCEL)
wx.EVT_BUTTON(self, self.CANCEL, self.OnCancel)

Is it just personal choice or is one of the above methods likely to be
written out of wxPython? Are there any beneifits of using either
method? As far as I can see they both do the same thing!

Thanks in advance of any advice.

Yours Faithfully,

Wesley Brooks

Hi Wesley,

ยทยทยท

On 5/15/07, Wesley Brooks wrote:

Duing my use and learning of wxPython I've come across two different
styles of event binding and would like two know which of the following
is the 'prefered' option.

self.Cancel.Bind(wx.EVT_BUTTON, self.OnCancel,id=self.CANCEL)
wx.EVT_BUTTON(self, self.CANCEL, self.OnCancel)

Is it just personal choice or is one of the above methods likely to be
written out of wxPython? Are there any beneifits of using either
method? As far as I can see they both do the same thing!

I believe this page is the right one for you:

http://wiki.wxpython.org/self.Bind_vs._self.button.Bind

:smiley:

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/