--- MainORM.py  2013-06-24 22:19:26.343298892 -0700
+++ /tmp/MainORM.py 2013-06-24 22:19:16.091248053 -0700
@@ -1007,9 +1007,10 @@
# Show how to get a custom minimizing behaviour, i.e., to minimize a pane
# inside an existing AuiToolBar
tree = self._mgr.GetPane("test8")
- tree.MinimizeMode(aui.AUI_MINIMIZE_POS_TOOLBAR)
- toolbarPane = self._mgr.GetPane(tb4)
- tree.MinimizeTarget(toolbarPane)
+ if hasattr(aui, 'AUI_MINIMIZE_POS_TOOLBAR'):
+ tree.MinimizeMode(aui.AUI_MINIMIZE_POS_TOOLBAR)
+ toolbarPane = self._mgr.GetPane(tb4)
+ tree.MinimizeTarget(toolbarPane)

# "commit" all changes made to AuiManager
self._mgr.Update()
@@ -1436,6 +1437,9 @@
while True:
if self.tree.ItemHasChildren(root):
(child, cookie) = self.tree.GetFirstChild(root)
+ if not child.IsOk():
+ break
+
key = self.tree.GetPyData(child)
if key not in keys: # shouldn't be in tree
self.tree.Delete(child)