[wxPython-dev] 20060923 2.7 preview build (wx.Button.Label
attribute error)
Alexei Vinidiktov
alexei.vinidiktov at gmail.com
Sun Oct 1 02:43:34 PDT 2006
I can't *set* the Label property of wx.Button. I'm getting "attribute
error: can't set attribute".
On the other hand, I can successfully *get* the Label property of a
wx.Button.
I'm on WinXP SP2, Python 2.4, wxPython 2.7.0.1pre.20060923
import wx
class MyFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, -1, "My Frame", size=(190, 100))
panel = wx.Panel(self, -1)
self.button1 = wx.Button(panel, -1, "Play", pos=(20, 10))
self.Bind(wx.EVT_BUTTON, self.OnButton1, self.button1)
self.button2 = wx.Button(panel, -1, "Stop", pos=(100, 10))
self.Bind(wx.EVT_BUTTON, self.OnButton2, self.button2)
def OnButton1(self, event):
self.button1.Label = "Finished" # can't set property
def OnButton2(self, event):
self.button2.SetLabel(self.button1.Label) # can get property
if __name__ == '__main__':
app = wx.PySimpleApp()
frame = MyFrame()
frame.Show(True)
app.MainLoop()
Robin Dunn wrote:
> Hi All,
>
> I started a preview build over the weekend but it apparently got stuck
> sometime after uploading the files to starship and sending the email to
> this list. The files are available at the usual place:
>
> http://starship.python.net/crew/robind/wxPython/daily/20060923/
> http://starship.python.net/crew/robind/wxPython/daily/20060923/CHANGES.txt
>
> I'm uploading the Ubuntu packages right now.
>
> Since this build was done I've fixed a couple bugs in the new
> wx.lib.expando module, and also the AttributeErrors when importing
> wxPython.wx, but I decided to stick with the current packages since they
> were already built and uploaded. These additional fixes will be in the
> next build.
>
--
Best regards,
Alexei Vinidiktov
More information about the wxpython-dev
mailing list