dabo Commit
Revision 6783
Date: 2011-08-16 06:20:02 -0700 (Tue, 16 Aug 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6783

Changed:
U   trunk/dabo/db/dCursorMixin.py

Log:
Minor update in RowNumber property setter/getter.

Diff:
Modified: trunk/dabo/db/dCursorMixin.py
===================================================================
--- trunk/dabo/db/dCursorMixin.py       2011-08-16 12:27:05 UTC (rev 6782)
+++ trunk/dabo/db/dCursorMixin.py       2011-08-16 13:20:02 UTC (rev 6783)
@@ -2883,16 +2883,14 @@
 
        def _getRowNumber(self):
                try:
-                       ret = min(self.__rownumber, self._getRowCount() - 1)
+                       ret = min(self.__rownumber, self.RowCount - 1)
                except AttributeError:
                        ret = -1
                return ret
 
 
        def _setRowNumber(self, num):
-               rn = max(0, num)
-               maxrow = max(0, (self.RowCount - 1))
-               self.__rownumber = min(rn, maxrow)
+               self.__rownumber = min(max(0, num), self.RowCount - 1)
 
 
        def _getTable(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]

Reply via email to