dabo Commit
Revision 4982
Date: 2009-01-26 14:18:58 -0800 (Mon, 26 Jan 2009)
Author: Paul
Trac: http://trac.dabodev.com/changeset/4982

Changed:
U   trunk/dabo/ui/uiwx/dFormMixin.py

Log:
Fixed _createToolbar() to fail gracefully if the toolbar couldn't be set.


Diff:
Modified: trunk/dabo/ui/uiwx/dFormMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dFormMixin.py    2009-01-26 20:07:27 UTC (rev 4981)
+++ trunk/dabo/ui/uiwx/dFormMixin.py    2009-01-26 22:18:58 UTC (rev 4982)
@@ -187,10 +187,12 @@
 
 
        def _createToolBar(self):
-               if (self.ShowToolBar
-                               and self.ToolBar is None
-                               and not isinstance(self, wx.Dialog)):
-                       self.ToolBar = dabo.ui.dToolBar(self)
+               if self.ShowToolBar and self.ToolBar is None:
+                       try:
+                               self.ToolBar = dabo.ui.dToolBar(self)
+                       except TypeError:
+                               # We are a dialog, an MDI Child, or some other 
toolbar-unworthy form
+                               pass
 
 
        def _createStatusBar(self):



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to