dabo Commit
Revision 4878
Date: 2008-12-19 10:08:39 -0800 (Fri, 19 Dec 2008)
Author: Paul
Trac: http://trac.dabodev.com/dabo/changeset/4878
Changed:
U trunk/dabo/ui/uiwx/dFormMixin.py
Log:
Catching TypeError in _getStatusBar as well as AttributeError appears to be
necessary, when we are a dialog.
Diff:
Modified: trunk/dabo/ui/uiwx/dFormMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dFormMixin.py 2008-12-18 21:16:31 UTC (rev 4877)
+++ trunk/dabo/ui/uiwx/dFormMixin.py 2008-12-19 18:08:39 UTC (rev 4878)
@@ -945,7 +945,7 @@
controllingFrame = self
try:
sb = controllingFrame.GetStatusBar()
- except AttributeError:
+ except (AttributeError, TypeError):
# certain dialogs don't have status bars
sb = None
if sb:
@@ -1006,21 +1006,9 @@
def _getToolBar(self):
try:
return self.GetToolBar()
- except AttributeError:
- # We are probably a dialog
+ except (AttributeError, TypeError):
+ # We are probably a dialog or some other form that
doesn't support ToolBars.
return None
- except TypeError:
- # May be too early in control instantiation: I'm seeing
this
- # in my error logs for my app, but can't reproduce on
my end:
- # Traceback (most recent call last):
- # File "dabo\ui\uiwx\dFormMixin.pyc", line 180, in
__onWxActivate
- # File "dabo\ui\uiwx\dPemMixin.pyc", line 942, in
raiseEvent
- # File "dabo\lib\eventMixin.pyc", line 92, in
raiseEvent
- # File "dabo\ui\uiwx\dFormMixin.pyc", line 191, in
__onActivate
- # File "dabo\ui\uiwx\dFormMixin.pyc", line 969, in
_getToolBar
- # File "wx\_windows.pyc", line 578, in GetToolBar
- #<type 'exceptions.TypeError'>: in method
'Frame_GetToolBar', expected argument 1 of type 'wxFrame const *'
- return None
def _setToolBar(self, val):
self.SetToolBar(val)
_______________________________________________
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]