471,075 Members | 658 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,075 software developers and data experts.

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 2181
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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.