dabo Commit
Revision 4258
Date: 2008-07-09 11:39:15 -0700 (Wed, 09 Jul 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4258
Changed:
U trunk/dabo/lib/datanav2/Form.py
Log:
It is possible for the user to hit the 'delete' button on a datanav
toolbar before the grid on the browsepage has even been created.
This fix catches that case and recovers gracefully.
Diff:
Modified: trunk/dabo/lib/datanav2/Form.py
===================================================================
--- trunk/dabo/lib/datanav2/Form.py 2008-07-08 21:56:55 UTC (rev 4257)
+++ trunk/dabo/lib/datanav2/Form.py 2008-07-09 18:39:15 UTC (rev 4258)
@@ -202,7 +202,14 @@
def onDelete(self, evt):
super(Form, self).onDelete(evt)
# Make sure that the grid is properly updated.
- self.PageFrame.Pages[1].BrowseGrid.refresh()
+ try:
+ self.PageFrame.Pages[1].BrowseGrid.refresh()
+ except AttributeError, e:
+ # Grid may not even exist yet.
+ if "BrowseGrid" in str(e):
+ pass
+ else:
+ raise
def enableQuickReport(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]