i'm jus tplaying around and i've hit a snag doing something very simple wrong.
would i be close in guessing wx.Panel(self, -1) is whats wrong, because "sefl" in a notebook object and it needs a window, and i can fix it somehow by using/inherititing the wx.Frame class?
import wx
class ProjectNoteBook(wx.Notebook):
"""This class creates the text space and orangises the files into tabbed notebook style"""
def __init__(self, parent,id):
#This creates the inital blank tab
tab = self.MakePanel()
self.AddPage(tab, "New")
def MakePanel(self):
"""This function makes new panels"""
p = wx.Panel(self, -1) return p
class MainFrame(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title, size = (1024,768))
notebook = ProjectNoteBook(self, -1)
File "PythonKISS/PythonKISS.py", line 19, in MakePanel
p = wx.Panel(self, -1)
File "/usr/local/lib/python2.3/site-packages/wxPython/windows.py", line 690, in __init__
self.this = windowsc.new_wxPanel(*_args,**_kwargs)
TypeError: Type error in argument 1 of new_wxPanel. Expected _wxWindow_p.