dabo Commit
Revision 4545
Date: 2008-10-04 08:20:14 -0700 (Sat, 04 Oct 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4545
Changed:
U trunk/dabo/ui/uiwx/dGrid.py
Log:
Found a problem when working with a very large, complex form: the superclass
call to update() was firing before the rest of the grid update() code had
finished, causing a maximum recursion error. Changing it to a
callAfterInterval() fixes this.
Diff:
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2008-10-03 12:43:03 UTC (rev 4544)
+++ trunk/dabo/ui/uiwx/dGrid.py 2008-10-04 15:20:14 UTC (rev 4545)
@@ -1878,10 +1878,15 @@
self.bindEvent(dEvents.GridHeaderMouseRightUp,
self._onGridHeaderMouseRightUp)
self.bindEvent(dEvents.GridHeaderMouseRightClick,
self._onGridHeaderMouseRightClick)
-
def update(self):
- self.super()
+ """We need to re-sync various properties after the data is
updated. However,
+ with very large grids, multiple update calls can result in
problems. So we
+ use a callAfterInterval() to eliminate the duplicate calls.
+ """
+ dabo.ui.callAfterInterval(100, self._updateSync)
+ def _updateSync(self):
+ super(dGrid, self).update
self._Table._clearCache()
self._syncRowCount()
self._syncColumnCount()
_______________________________________________
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]