Hi,
So the line above should be, I think:
var_MyMiniFrame = MyMiniFrame(None, 'My Mini Frame', wx.Point(0,0),
wx.Size(200,200), 0)
This answer above is completely freezing my IDLE leaving message like the
one below:
Attribute Error: 'NoneType' object has no attribute 'Bind'
A little change [-1] is not freezing IDLE, but still returns a different
error, like this one below:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_misc.py",
line 1357, in Notify
self.notify()
File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 14738, in Notify
self.result = self.callable(*self.args, **self.kwargs)
File "/home/dry/Dokumenty/pyt/37.py", line 75, in showFrame
var_MyMiniFrame=MyMiniFrame(None, -1, 'My Mini Frame', wx.Point(0,0),
wx.Size(200,200), 0)
TypeError: __init__() takes at most 6 arguments (7 given)
^ The error says your passing too many variables
Your class Def
"""
class MyMiniFrame(wx.MiniFrame):
print 3
def __init__(self, parent, title, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE):
# parent.y='two'
wx.MiniFrame.__init__(self, parent, -1, title, pos, size, style)
"""
The error as per the exception on Line 75:
"""
var_MyMiniFrame=MyMiniFrame(None, -1, 'My Mini Frame', wx.Point(0,0),
wx.Size(200,200), 0)
"""
Your class takes 5 parameters plus the implice 'self' param, when you
create it on line 75 you are passing 6 parameters plus the implicit
'self' so 7 > 6 just as the exception states.
Your definition is PARENT, TITLE, POS, SIZE, STYLE, your passing
PARENT, ID, TITLE, POS, SIZE, STYLE. For you usage you only really
need to pass the PARENT and TITLE.
"""
var_MyMiniFrame=MyMiniFrame(None, 'My Mini Frame')
"""
Cody
···
On Thu, Jun 14, 2012 at 10:13 AM, dryhay <dryhay@gmail.com> wrote: