dabo Commit
Revision 4356
Date: 2008-08-04 11:38:24 -0700 (Mon, 04 Aug 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4356
Changed:
U trunk/dabo/ui/uiwx/dFormMixin.py
Log:
Actually, since we are testing for AttributeError as well the outer hasattr()
is no longer necessary.
Diff:
Modified: trunk/dabo/ui/uiwx/dFormMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dFormMixin.py 2008-08-04 18:36:02 UTC (rev 4355)
+++ trunk/dabo/ui/uiwx/dFormMixin.py 2008-08-04 18:38:24 UTC (rev 4356)
@@ -867,19 +867,18 @@
def _getStatusBar(self):
- if hasattr(self, "GetStatusBar"):
- try:
- ret = self.GetStatusBar()
- except (TypeError, AttributeError):
- # pkm: My client got a TypeError from the wx
layer, perhaps because the
- # window is a dialog and not a form, but I
can't reproduce on my end.
- # Just return None immediately if this
happens again.
- return None
- if (ret is None
- and not isinstance(self,
wx.MDIChildFrame)
- and self.ShowStatusBar):
- ret = dabo.ui.dStatusBar(self)
- self.SetStatusBar(ret)
+ try:
+ ret = self.GetStatusBar()
+ except (TypeError, AttributeError):
+ # pkm: My client got a TypeError from the wx layer,
perhaps because the
+ # window is a dialog and not a form, but I can't
reproduce on my end.
+ # Just return None immediately if this happens
again.
+ return None
+ if (ret is None
+ and not isinstance(self, wx.MDIChildFrame)
+ and self.ShowStatusBar):
+ ret = dabo.ui.dStatusBar(self)
+ self.SetStatusBar(ret)
else:
ret = None
return ret
_______________________________________________
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]