Ok, as I guessed, it was Boa installation which changed the wxpython
version used.
I removed Boa...
Thanks !
Nicolas
Greg Krohn a écrit :
Nicolas Pourcelot wrote:
Hello,
my script worked well until today : when I tried to launch it, I got
the following :
frame = MyFrame(None,-1,Geometrie,size=wx.Size(600,400))
File /home/nico/Desktop/wxGeometrie/version 0.73/geometrie.py,
line 74, in __init__
self.commande.Bind(wx.EVT_CHAR, self.EvtChar)
AttributeError: wxTextCtrl instance has no attribute 'Bind'
(self.commande is a wxTextCtrl instance)
I don't understand : why did wxTextCtrl lost its Bind attribute ??
As there's not so much changes on my computer since yesterday, I
suppose this is due to Boa package installation on my Ubuntu Hoary ?
Does Boa installation changes wxpython version ?
Is wxTextCtrl attribute .Bind() obsolete ??
Thanks,
Nicolas
control.Bind is relativly new. The wxTextCtrl notation (vs wx.TextCtrl) is
the old way (but it IS kept around for backwards compatablility). My guess
is that your code is for for a newer version of wxPython than what you
actually have.
Try printing the version from in your code:
import wxPyhon
print wxPython.__version__
self.commande.Bind(wx.EVT_CHAR, self.EvtChar)
-greg
--
http://mail.python.org/mailman/listinfo/python-list