dabo Commit
Revision 3457
Date: 2007-10-11 17:44:04 -0700 (Thu, 11 Oct 2007)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/3457
Changed:
U trunk/dabo/ui/uiwx/dForm.py
U trunk/dabo/ui/uiwx/dGrid.py
Log:
Cleaned up the way that the RowNumChanged event was being handled; now it
passes the row information in the event itself, rather than forcing the handler
to re-discover that information.
Diff:
Modified: trunk/dabo/ui/uiwx/dForm.py
===================================================================
--- trunk/dabo/ui/uiwx/dForm.py 2007-10-11 16:53:01 UTC (rev 3456)
+++ trunk/dabo/ui/uiwx/dForm.py 2007-10-12 00:44:04 UTC (rev 3457)
@@ -267,7 +267,8 @@
else:
if biz.RowNumber != oldRowNum:
# Notify listeners that the row number changed:
- dabo.ui.callAfter(self.raiseEvent,
dEvents.RowNumChanged)
+ dabo.ui.callAfter(self.raiseEvent,
dEvents.RowNumChanged,
+ newRowNumber=biz.RowNumber,
oldRowNumber=oldRowNum)
self.update()
self.afterPointerMove()
self.refresh()
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2007-10-11 16:53:01 UTC (rev 3456)
+++ trunk/dabo/ui/uiwx/dGrid.py 2007-10-12 00:44:04 UTC (rev 3457)
@@ -2886,7 +2886,10 @@
##----------------------------------------------------------##
def __onRowNumChanged(self, evt):
# The form reports that the rownum has changed: sync the grid
CurrentRow
- self._syncCurrentRow()
+ try:
+ self.CurrentRow = evt.newRowNumber
+ except AttributeError:
+ pass
def _onGridCellEdited(self, evt):
_______________________________________________
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/dabo-dev/[EMAIL PROTECTED]