468,133 Members | 1,500 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,133 developers. It's quick & easy.

wxpython and wxtextctrl

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
Jul 19 '05 #1
2 2118
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

Jul 19 '05 #2
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

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Daniel Ehrenberg | last post: by
3 posts views Thread by Logan | last post: by
3 posts views Thread by hellprout | last post: by
8 posts views Thread by Madhan | last post: by
3 posts views Thread by Russ Phillips | last post: by
27 posts views Thread by didacticone | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.