Author: reinhard
Date: 2009-12-09 16:11:43 -0600 (Wed, 09 Dec 2009)
New Revision: 10112
Modified:
trunk/gnue-forms/src/GFObjects/GFBlock.py
Log:
Don't allow record navigation in unbound blocks.
Modified: trunk/gnue-forms/src/GFObjects/GFBlock.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFBlock.py 2009-12-09 22:02:49 UTC (rev
10111)
+++ trunk/gnue-forms/src/GFObjects/GFBlock.py 2009-12-09 22:11:43 UTC (rev
10112)
@@ -692,6 +692,9 @@
Move the record pointer to the first record of the block.
"""
+ if self._dataSourceLink.type == 'unbound':
+ return
+
if self.mode == 'query':
return
@@ -717,11 +720,14 @@
the first record.
"""
+ if self._dataSourceLink.type == 'unbound':
+ return False
+
if self.mode == 'query':
return False
if self.__resultset is None:
- return
+ return False
if self.__resultset.isFirstRecord():
return False
@@ -747,11 +753,14 @@
the last record and no new record was inserted.
"""
+ if self._dataSourceLink.type == 'unbound':
+ return False
+
if self.mode == 'query':
return False
if self.__resultset is None:
- return
+ return False
if self.__resultset.isLastRecord():
if self.autoCreate and self.get_record_status() != 'empty' and \
@@ -775,6 +784,9 @@
Move the record pointer to the last record of the block.
"""
+ if self._dataSourceLink.type == 'unbound':
+ return
+
if self.mode == 'query':
return
@@ -800,6 +812,9 @@
value, move relative to the last record.
"""
+ if self._dataSourceLink.type == 'unbound':
+ return
+
if self.mode == 'query':
return
@@ -832,6 +847,12 @@
@param count: the number of records to move from the current record.
"""
+ if self._dataSourceLink.type == 'unbound':
+ return
+
+ if self.mode == 'query':
+ return
+
if self.__resultset is None:
return
@@ -854,6 +875,9 @@
@returns: True if a record was found, False otherwise.
"""
+ if self._dataSourceLink.type == 'unbound':
+ return
+
if self.mode == 'query':
return False
_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue