problem with wxPanel derivation class

N

none

wxGlade created a simple Frame with a panel a sizer and 3 wxControls ,
saticText, TextCtrl, and a Button.

The resulting code works fine.

Now the problem.
I wish to make a separate class derrived from wxPanel that has the sized
and controls as above. It jusst won't work


<code id="gladeGen" class="works_ok">
#!/usr/bin/env python
# -*- coding: ISO-8859-1 -*-
# generated by wxGlade 0.4cvs on Thu Oct 11 13:26:19 2007

import wx

class MyFrameOne(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: MyFrameOne.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.panel = wx.Panel(self, -1)
self.staticbox = wx.StaticBox(self.panel, -1, "StaticBox")
self.label = wx.StaticText(self.panel, -1, "Field Name")
self.textBox = wx.TextCtrl(self.panel, -1, "Field Value")
self.button = wx.Button(self.panel, -1, "Edit")

self.__set_properties()
self.__do_layout()
# end wxGlade

def __set_properties(self):
# begin wxGlade: MyFrameOne.__set_properties
self.SetTitle("frame_1")
self.label.SetMinSize((-1, 15))
# end wxGlade

def __do_layout(self):
# begin wxGlade: MyFrameOne.__do_layout
sizer_1 = wx.BoxSizer(wx.VERTICAL)
sizer = wx.StaticBoxSizer(self.staticbox, wx.HORIZONTAL)
sizer.Add(self.label, 0, wx.ALL, 3)
sizer.Add(self.textBox, 0, wx.ALL, 3)
sizer.Add(self.button, 0, wx.ALL, 3)
self.panel.SetAutoLayout(True)
self.panel.SetSizer(sizer)
sizer.Fit(self.panel)
sizer.SetSizeHints(self.panel)
sizer_1.Add(self.panel, 1, wx.EXPAND, 0)
self.SetAutoLayout(True)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
sizer_1.SetSizeHints(self)
self.Layout()
# end wxGlade

# end of class MyFrameOne

## modified from BoaApp
class App(wx.App):
def OnInit(self):
wx.InitAllImageHandlers()
self.main = MyFrameOne(None)
self.main.Show()
self.SetTopWindow(self.main)
return True

def main():
application = App(0)
application.MainLoop()

if __name__ == '__main__':
main()

</code>

<code id="modifiedFromGlade" class="fails">
#!/usr/bin/env python
# -*- coding: ISO-8859-1 -*-
#The commented out code from MyFrame was moved to class Panel \
# and appropriately modified by changing self.panel to self etc

import wx

class MyFrameTwo(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: MyFrameTwo.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
## self.panel = panel(self, -1)
self.panel = Panel(self, -1)
self.__set_properties()
self.__do_layout()
# end wxGlade

def __set_properties(self):
# begin wxGlade: MyFrameTwo.__set_properties
self.SetTitle("frame_1")
self.label.SetMinSize((-1, 15))
# end wxGlade

def __do_layout(self):
# begin wxGlade: MyFrameTwo.__do_layout
sizer_1 = wx.BoxSizer(wx.VERTICAL)
## sizer = wx.StaticBoxSizer(self.staticbox, wx.HORIZONTAL)
## sizer.Add(self.label, 0, wx.ALL, 3)
## sizer.Add(self.textBox, 0, wx.ALL, 3)
## sizer.Add(self.button, 0, wx.ALL, 3)
#### self.panel.SetAutoLayout(True)
## self.panel.SetSizer(sizer)
## sizer.Fit(self.panel)
## sizer.SetSizeHints(self.panel)
sizer_1.Add(self.panel, 1, wx.EXPAND, 0)
self.SetAutoLayout(True)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
sizer_1.SetSizeHints(self)
self.Layout()
# end wxGlade

# end of class MyFrameTwo


class Panel (wx.Panel):
def __init__(self, *args, **kwds):
self.staticbox = wx.StaticBox(self, -1, "StaticBox")
self.label = wx.StaticText(self, -1, "Field Name")
self.textBox = wx.TextCtrl(self, -1, "Field Value")
self.button = wx.Button(self, -1, "Edit")
__doLayout()

def __doLayout():
sizer = wx.StaticBoxSizer(self.staticbox, wx.HORIZONTAL)
sizer.Add(self.label, 0, wx.ALL, 3)
sizer.Add(self.textBox, 0, wx.ALL, 3)
sizer.Add(self.button, 0, wx.ALL, 3)

# maybe comment this and uncommennt frame2's corresponding line
panel.SetAutoLayout(True)

self.SetSizer(sizer)
sizer.Fit(self.panel)
sizer.SetSizeHints(self.panel)


## modified from BoaApp
class App(wx.App):
def OnInit(self):
wx.InitAllImageHandlers()
self.main = MyFrameTwo(None)
self.main.Show()
self.SetTopWindow(self.main)
return True

def main():
application = App(0)
application.MainLoop()

if __name__ == '__main__':
main()

</code>

<errorMessages>
/home/xaos/xpy/cnc/i2g/prefDialog/test/frame2.py
Traceback (most recent call last):
File "/home/xaos/xpy/cnc/i2g/prefDialog/test/frame2.py", line 82, in ?
main()
File "~/xpy/cnc/i2g/prefDialog/test/frame2.py", line 78, in main
application = App(0)
File
"/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line
7473, in __init__
self._BootstrapApp()
File
"/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line
7125, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "~/xpy/cnc/i2g/prefDialog/test/frame2.py", line 72, in OnInit
self.main = MyFrameTwo(None)
File "~/xpy/cnc/i2g/prefDialog/test/frame2.py", line 13, in __init__
self.panel = Panel(self, -1)
File "~/xpy/cnc/i2g/prefDialog/test/frame2.py", line 48, in __init__
self.staticbox = wx.StaticBox(self, -1, "StaticBox")
File
"/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_controls.py",
line 990, in __init__
newobj = _controls_.new_StaticBox(*args, **kwargs)
TypeError: argument number 1: a 'wxWindow *' is expected, 'Panel' is
received
Script terminated.

</errorMessages>


It seems as though the complaint is that a 'wxWindow *' is expected,
'Panel' is received
However, Panel IS a wx.Panel derivative which IS a wx.Window derivative!
Additionally, the methods in the code of Panel and MyFrameOne seem to be
identical.
I can't understand this. Anyone have any thoughts?

I'm using spe as an IDE

~S~

I taught myself everything I know about Python and wxPython in the lasst
week and I still don't know everything.
 
L

Larry Bates

none said:
wxGlade created a simple Frame with a panel a sizer and 3 wxControls ,
saticText, TextCtrl, and a Button.

The resulting code works fine.

Now the problem.
I wish to make a separate class derrived from wxPanel that has the sized
and controls as above. It jusst won't work


<code id="gladeGen" class="works_ok">
#!/usr/bin/env python
# -*- coding: ISO-8859-1 -*-
# generated by wxGlade 0.4cvs on Thu Oct 11 13:26:19 2007

import wx

class MyFrameOne(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: MyFrameOne.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.panel = wx.Panel(self, -1)
self.staticbox = wx.StaticBox(self.panel, -1, "StaticBox")
self.label = wx.StaticText(self.panel, -1, "Field Name")
self.textBox = wx.TextCtrl(self.panel, -1, "Field Value")
self.button = wx.Button(self.panel, -1, "Edit")

self.__set_properties()
self.__do_layout()
# end wxGlade

def __set_properties(self):
# begin wxGlade: MyFrameOne.__set_properties
self.SetTitle("frame_1")
self.label.SetMinSize((-1, 15))
# end wxGlade

def __do_layout(self):
# begin wxGlade: MyFrameOne.__do_layout
sizer_1 = wx.BoxSizer(wx.VERTICAL)
sizer = wx.StaticBoxSizer(self.staticbox, wx.HORIZONTAL)
sizer.Add(self.label, 0, wx.ALL, 3)
sizer.Add(self.textBox, 0, wx.ALL, 3)
sizer.Add(self.button, 0, wx.ALL, 3)
self.panel.SetAutoLayout(True)
self.panel.SetSizer(sizer)
sizer.Fit(self.panel)
sizer.SetSizeHints(self.panel)
sizer_1.Add(self.panel, 1, wx.EXPAND, 0)
self.SetAutoLayout(True)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
sizer_1.SetSizeHints(self)
self.Layout()
# end wxGlade

# end of class MyFrameOne

## modified from BoaApp
class App(wx.App):
def OnInit(self):
wx.InitAllImageHandlers()
self.main = MyFrameOne(None)
self.main.Show()
self.SetTopWindow(self.main)
return True

def main():
application = App(0)
application.MainLoop()

if __name__ == '__main__':
main()

</code>

<code id="modifiedFromGlade" class="fails">
#!/usr/bin/env python
# -*- coding: ISO-8859-1 -*-
#The commented out code from MyFrame was moved to class Panel \
# and appropriately modified by changing self.panel to self etc

import wx

class MyFrameTwo(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: MyFrameTwo.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
## self.panel = panel(self, -1)
self.panel = Panel(self, -1)
self.__set_properties()
self.__do_layout()
# end wxGlade

def __set_properties(self):
# begin wxGlade: MyFrameTwo.__set_properties
self.SetTitle("frame_1")
self.label.SetMinSize((-1, 15))
# end wxGlade

def __do_layout(self):
# begin wxGlade: MyFrameTwo.__do_layout
sizer_1 = wx.BoxSizer(wx.VERTICAL)
## sizer = wx.StaticBoxSizer(self.staticbox, wx.HORIZONTAL)
## sizer.Add(self.label, 0, wx.ALL, 3)
## sizer.Add(self.textBox, 0, wx.ALL, 3)
## sizer.Add(self.button, 0, wx.ALL, 3)
#### self.panel.SetAutoLayout(True)
## self.panel.SetSizer(sizer)
## sizer.Fit(self.panel)
## sizer.SetSizeHints(self.panel)
sizer_1.Add(self.panel, 1, wx.EXPAND, 0)
self.SetAutoLayout(True)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
sizer_1.SetSizeHints(self)
self.Layout()
# end wxGlade

# end of class MyFrameTwo


class Panel (wx.Panel):
def __init__(self, *args, **kwds):
self.staticbox = wx.StaticBox(self, -1, "StaticBox")
self.label = wx.StaticText(self, -1, "Field Name")
self.textBox = wx.TextCtrl(self, -1, "Field Value")
self.button = wx.Button(self, -1, "Edit")
__doLayout()

def __doLayout():
sizer = wx.StaticBoxSizer(self.staticbox, wx.HORIZONTAL)
sizer.Add(self.label, 0, wx.ALL, 3)
sizer.Add(self.textBox, 0, wx.ALL, 3)
sizer.Add(self.button, 0, wx.ALL, 3)

# maybe comment this and uncommennt frame2's corresponding line
panel.SetAutoLayout(True)

self.SetSizer(sizer)
sizer.Fit(self.panel)
sizer.SetSizeHints(self.panel)


## modified from BoaApp
class App(wx.App):
def OnInit(self):
wx.InitAllImageHandlers()
self.main = MyFrameTwo(None)
self.main.Show()
self.SetTopWindow(self.main)
return True

def main():
application = App(0)
application.MainLoop()

if __name__ == '__main__':
main()

</code>

<errorMessages>
/home/xaos/xpy/cnc/i2g/prefDialog/test/frame2.py
Traceback (most recent call last):
File "/home/xaos/xpy/cnc/i2g/prefDialog/test/frame2.py", line 82, in ?
main()
File "~/xpy/cnc/i2g/prefDialog/test/frame2.py", line 78, in main
application = App(0)
File
"/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line
7473, in __init__
self._BootstrapApp()
File
"/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line
7125, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "~/xpy/cnc/i2g/prefDialog/test/frame2.py", line 72, in OnInit
self.main = MyFrameTwo(None)
File "~/xpy/cnc/i2g/prefDialog/test/frame2.py", line 13, in __init__
self.panel = Panel(self, -1)
File "~/xpy/cnc/i2g/prefDialog/test/frame2.py", line 48, in __init__
self.staticbox = wx.StaticBox(self, -1, "StaticBox")
File
"/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_controls.py",
line 990, in __init__
newobj = _controls_.new_StaticBox(*args, **kwargs)
TypeError: argument number 1: a 'wxWindow *' is expected, 'Panel' is
received
Script terminated.

</errorMessages>


It seems as though the complaint is that a 'wxWindow *' is expected,
'Panel' is received
However, Panel IS a wx.Panel derivative which IS a wx.Window derivative!
Additionally, the methods in the code of Panel and MyFrameOne seem to be
identical.
I can't understand this. Anyone have any thoughts?

I'm using spe as an IDE

~S~

I taught myself everything I know about Python and wxPython in the lasst
week and I still don't know everything.
You will probably get better results if you post this to
gmane.com.python.wxpython list as it is specific to wxPython.

-Larry
 
K

kyosohma

You've got calls for properties in other classes and you don't
initialize the panel object. I edited the code somewhat so it'll at
least run. I tried to comment where I changed things, but I may have
missed a few minor points. See below:

<code>

#The commented out code from MyFrame was moved to class Panel \
# and appropriately modified by changing self.panel to self etc

import wx

class MyFrameTwo(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: MyFrameTwo.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
## self.panel = panel(self, -1)
self.panel = Panel(self, -1)
self.__set_properties()
self.__do_layout()
# end wxGlade

def __set_properties(self):
# begin wxGlade: MyFrameTwo.__set_properties
self.SetTitle("frame_1")
# end wxGlade

def __do_layout(self):
# begin wxGlade: MyFrameTwo.__do_layout
sizer_1 = wx.BoxSizer(wx.VERTICAL)
sizer_1.Add(self.panel, 1, wx.EXPAND, 0)
self.SetAutoLayout(True)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
sizer_1.SetSizeHints(self)
self.Layout()
# end wxGlade

# end of class MyFrameTwo

class Panel (wx.Panel):
def __init__(self, parent, *args, **kwds):
wx.Panel.__init__(self, parent) # Added line
self.staticbox = wx.StaticBox(self, -1, "StaticBox")
self.label = wx.StaticText(self, -1, "Field Name")
self.textBox = wx.TextCtrl(self, -1, "Field Value")
self.button = wx.Button(self, -1, "Edit")
self.__doLayout() # added self

def __doLayout(self): # added argument
sizer = wx.StaticBoxSizer(self.staticbox,
wx.HORIZONTAL)
sizer.Add(self.label, 0, wx.ALL, 3)
sizer.Add(self.textBox, 0, wx.ALL, 3)
sizer.Add(self.button, 0, wx.ALL, 3)
self.label.SetMinSize((-1, 15)) # moved from Frame

# maybe comment this and uncommennt frame2's
corresponding line
self.SetAutoLayout(True)

self.SetSizer(sizer)
sizer.Fit(self)
sizer.SetSizeHints(self)

## modified from BoaApp
class App(wx.App):
def OnInit(self):
wx.InitAllImageHandlers()
self.main = MyFrameTwo(None)
self.main.Show()
self.SetTopWindow(self.main)
return True

def main():
application = App(0)
application.MainLoop()

if __name__ == '__main__':
main()


</code>

Larry is correct. You'll get better help from the wxPython group. See
http://wxpython.org/maillist.php

Mike
 
C

Chris Mellon

wxGlade created a simple Frame with a panel a sizer and 3 wxControls ,
saticText, TextCtrl, and a Button.
It seems as though the complaint is that a 'wxWindow *' is expected,
'Panel' is received
However, Panel IS a wx.Panel derivative which IS a wx.Window derivative!
Additionally, the methods in the code of Panel and MyFrameOne seem to be
identical.
I can't understand this. Anyone have any thoughts?

It's because you didn't call the base class __init__. wxPython is a
SWIG wrapper around the C++ wxWidgets library, and if you don't call
the base class the SWIG infrastructure that maps your class to an
underlying C++ class doesn't happen and you get this error.
 
K

kyosohma

It's because you didn't call the base class __init__. wxPython is a
SWIG wrapper around the C++ wxWidgets library, and if you don't call
the base class the SWIG infrastructure that maps your class to an
underlying C++ class doesn't happen and you get this error.

Ah-so. I knew there was a more technical answer than what I gave.
Hopefully I didn't muddy the issue with my doofy code.

Mike
 
N

none

none said:
wxGlade created a simple Frame with a panel a sizer and 3 wxControls ,
saticText, TextCtrl, and a Button.

The resulting code works fine.

Now the problem.
I wish to make a separate class derrived from wxPanel that has the sized
and controls as above. It jusst won't work


<code id="gladeGen" class="works_ok">
#!/usr/bin/env python
# -*- coding: ISO-8859-1 -*-
# generated by wxGlade 0.4cvs on Thu Oct 11 13:26:19 2007

import wx

class MyFrameOne(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: MyFrameOne.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.panel = wx.Panel(self, -1)
self.staticbox = wx.StaticBox(self.panel, -1, "StaticBox")
self.label = wx.StaticText(self.panel, -1, "Field Name")
self.textBox = wx.TextCtrl(self.panel, -1, "Field Value")
self.button = wx.Button(self.panel, -1, "Edit")

self.__set_properties()
self.__do_layout()
# end wxGlade

def __set_properties(self):
# begin wxGlade: MyFrameOne.__set_properties
self.SetTitle("frame_1")
self.label.SetMinSize((-1, 15))
# end wxGlade

def __do_layout(self):
# begin wxGlade: MyFrameOne.__do_layout
sizer_1 = wx.BoxSizer(wx.VERTICAL)
sizer = wx.StaticBoxSizer(self.staticbox, wx.HORIZONTAL)
sizer.Add(self.label, 0, wx.ALL, 3)
sizer.Add(self.textBox, 0, wx.ALL, 3)
sizer.Add(self.button, 0, wx.ALL, 3)
self.panel.SetAutoLayout(True)
self.panel.SetSizer(sizer)
sizer.Fit(self.panel)
sizer.SetSizeHints(self.panel)
sizer_1.Add(self.panel, 1, wx.EXPAND, 0)
self.SetAutoLayout(True)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
sizer_1.SetSizeHints(self)
self.Layout()
# end wxGlade

# end of class MyFrameOne

## modified from BoaApp
class App(wx.App):
def OnInit(self):
wx.InitAllImageHandlers()
self.main = MyFrameOne(None)
self.main.Show()
self.SetTopWindow(self.main)
return True

def main():
application = App(0)
application.MainLoop()

if __name__ == '__main__':
main()

</code>

<code id="modifiedFromGlade" class="fails">
#!/usr/bin/env python
# -*- coding: ISO-8859-1 -*-
#The commented out code from MyFrame was moved to class Panel \
# and appropriately modified by changing self.panel to self etc

import wx

class MyFrameTwo(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: MyFrameTwo.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
## self.panel = panel(self, -1)
self.panel = Panel(self, -1)
self.__set_properties()
self.__do_layout()
# end wxGlade

def __set_properties(self):
# begin wxGlade: MyFrameTwo.__set_properties
self.SetTitle("frame_1")
self.label.SetMinSize((-1, 15))
# end wxGlade

def __do_layout(self):
# begin wxGlade: MyFrameTwo.__do_layout
sizer_1 = wx.BoxSizer(wx.VERTICAL)
## sizer = wx.StaticBoxSizer(self.staticbox, wx.HORIZONTAL)
## sizer.Add(self.label, 0, wx.ALL, 3)
## sizer.Add(self.textBox, 0, wx.ALL, 3)
## sizer.Add(self.button, 0, wx.ALL, 3)
#### self.panel.SetAutoLayout(True)
## self.panel.SetSizer(sizer)
## sizer.Fit(self.panel)
## sizer.SetSizeHints(self.panel)
sizer_1.Add(self.panel, 1, wx.EXPAND, 0)
self.SetAutoLayout(True)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
sizer_1.SetSizeHints(self)
self.Layout()
# end wxGlade

# end of class MyFrameTwo


class Panel (wx.Panel):
def __init__(self, *args, **kwds):
self.staticbox = wx.StaticBox(self, -1, "StaticBox")
self.label = wx.StaticText(self, -1, "Field Name")
self.textBox = wx.TextCtrl(self, -1, "Field Value")
self.button = wx.Button(self, -1, "Edit")
__doLayout()

def __doLayout():
sizer = wx.StaticBoxSizer(self.staticbox, wx.HORIZONTAL)
sizer.Add(self.label, 0, wx.ALL, 3)
sizer.Add(self.textBox, 0, wx.ALL, 3)
sizer.Add(self.button, 0, wx.ALL, 3)

# maybe comment this and uncommennt frame2's corresponding line
panel.SetAutoLayout(True)

self.SetSizer(sizer)
sizer.Fit(self.panel)
sizer.SetSizeHints(self.panel)


## modified from BoaApp
class App(wx.App):
def OnInit(self):
wx.InitAllImageHandlers()
self.main = MyFrameTwo(None)
self.main.Show()
self.SetTopWindow(self.main)
return True

def main():
application = App(0)
application.MainLoop()

if __name__ == '__main__':
main()

</code>

<errorMessages>
/home/xaos/xpy/cnc/i2g/prefDialog/test/frame2.py
Traceback (most recent call last):
File "/home/xaos/xpy/cnc/i2g/prefDialog/test/frame2.py", line 82, in ?
main()
File "~/xpy/cnc/i2g/prefDialog/test/frame2.py", line 78, in main
application = App(0)
File
"/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line
7473, in __init__
self._BootstrapApp()
File
"/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line
7125, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "~/xpy/cnc/i2g/prefDialog/test/frame2.py", line 72, in OnInit
self.main = MyFrameTwo(None)
File "~/xpy/cnc/i2g/prefDialog/test/frame2.py", line 13, in __init__
self.panel = Panel(self, -1)
File "~/xpy/cnc/i2g/prefDialog/test/frame2.py", line 48, in __init__
self.staticbox = wx.StaticBox(self, -1, "StaticBox")
File
"/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_controls.py",
line 990, in __init__
newobj = _controls_.new_StaticBox(*args, **kwargs)
TypeError: argument number 1: a 'wxWindow *' is expected, 'Panel' is
received
Script terminated.

</errorMessages>


It seems as though the complaint is that a 'wxWindow *' is expected,
'Panel' is received
However, Panel IS a wx.Panel derivative which IS a wx.Window derivative!
Additionally, the methods in the code of Panel and MyFrameOne seem to be
identical.
I can't understand this. Anyone have any thoughts?

I'm using spe as an IDE

~S~

I taught myself everything I know about Python and wxPython in the lasst
week and I still don't know everything.


Thanks All,
I didn't make the super() call (java terminology)
to the base class.

this is the only python group (en) on giganews, my first search
no wx or qt.
gmane.com.python.wxpython is not found
gmane.org came up and crashed firefox 3 times searching for python.
I'll try the wxpython forrum for x stuff, but you spoiled me with prompt
and accurate responses.


~S~

I'm trying to think, but nothing's happening
Slowly I learn, Step by Step ...
 
C

Chris Mellon

Thanks All,
I didn't make the super() call (java terminology)
to the base class.

this is the only python group (en) on giganews, my first search
no wx or qt.
gmane.com.python.wxpython is not found
gmane.org came up and crashed firefox 3 times searching for python.
I'll try the wxpython forrum for x stuff, but you spoiled me with prompt
and accurate responses.


The wxpython mailing list is wxpython-users. You can subscribe at
wxPython.org. It's not mirrored to an actual newsgroup, although I'm
sure gmane has it. You'll find wxpython-users to be at least as prompt
and accurate, at least with regard to wxPython-specific questions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top