dabo Commit
Revision 5030
Date: 2009-02-06 15:43:29 -0800 (Fri, 06 Feb 2009)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5030
Changed:
U trunk/dabo/ui/uiwx/dFormMixin.py
Log:
Was getting a TypeError in a dabo-induced setStatusText() call when the frame
was a dialog. Fixed.
Removed old _holdStatusText which isn't used anymore (I searched the entire dabo
tree and only found references in dFormMixin where we set it to "").
Diff:
Modified: trunk/dabo/ui/uiwx/dFormMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dFormMixin.py 2009-02-06 22:49:01 UTC (rev 5029)
+++ trunk/dabo/ui/uiwx/dFormMixin.py 2009-02-06 23:43:29 UTC (rev 5030)
@@ -104,7 +104,6 @@
self.debugText = ""
self.useOldDebugDialog = False
- self._holdStatusText = ""
self._statusStack = []
if app is not None:
app.uiForms.add(self)
@@ -947,22 +946,19 @@
send the text to the main frame or this frame. This matters
with MDI
versus non-MDI forms.
"""
- hasStatus = True
if sys.platform.startswith("win") and isinstance(self,
wx.MDIChildFrame):
controllingFrame = self.Application.MainForm
else:
controllingFrame = self
+
try:
- controllingFrame.GetStatusBar
- except AttributeError:
- hasStatus = False
- if hasStatus and controllingFrame.GetStatusBar():
- if self._holdStatusText:
-
controllingFrame.SetStatusText(self._holdStatusText)
- self._holdStatusText = ""
- else:
- controllingFrame.SetStatusText(val)
- controllingFrame.GetStatusBar().Update()
+ statusBar = controllingFrame.GetStatusBar()
+ except (AttributeError, TypeError):
+ statusBar = None
+
+ if statusBar:
+ controllingFrame.SetStatusText(val)
+ statusBar.Update()
def _getStayOnTop(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]