I have been experimenting with Mike’s AUI notebook examples, and tried to add a set of sizers to a panel. It worked before adding sizers, but now it gives an error.
I am also curious why top_sizer becomes a wxPyDeadObject, while bottom_sizer and panel_sizer are BoxSizer types?
Thanks in advance,
MarkL
Traceback (most recent call last):
('top_sizer type is ', <class ‘wx._core._wxPyDeadObject’>)
File “/Users/marklivingstone/Google Drive/Mark Livingstone PhD content/Code/learning_framework.py”, line 207, in
('bottom_sizer type is ', <class ‘wx._core.BoxSizer’>)
app = OSXApp(False)
('panel_sizer type is ', <class ‘wx._core.BoxSizer’>)
File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/_core.py”, line 8631, in init
self._BootstrapApp()
File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/_core.py”, line 8196, in _BootstrapApp
return core.PyApp__BootstrapApp(*args, **kwargs)
File “/Users/marklivingstone/Google Drive/Mark Livingstone PhD content/Code/learning_framework.py”, line 27, in OnInit
self.frame = OSXFrame(None, title=“Bioinformatics Pipeline Framework”, size=(600, 480))
File “/Users/marklivingstone/Google Drive/Mark Livingstone PhD content/Code/learning_framework.py”, line 165, in init
self.panel = MyPanel(self)
File “/Users/marklivingstone/Google Drive/Mark Livingstone PhD content/Code/learning_framework.py”, line 126, in init
self.nb = MyAuiNotebook(self)
File “/Users/marklivingstone/Google Drive/Mark Livingstone PhD content/Code/learning_framework.py”, line 49, in init
self.AddPage(panelTwo.TabPanel(self), “Transferred Result”, False)
File “/Users/marklivingstone/Google Drive/Mark Livingstone PhD content/Code/panelTwo.py”, line 73, in init
self.panel_sizer.Add(self.top_sizer, 0, wx.ALL, 5) # <------ traceback problem line
File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/_core.py”, line 14460, in Add
return core.Sizer_Add(*args, **kwargs)
TypeError: wx.Window, wx.Sizer, wx.Size, or (w,h) expected for item
Process finished with exit code 1
panelTwo.py (2.92 KB)