[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r5758 - in trunk/gnue-forms/src: . GFObjects
From: |
jamest |
Subject: |
r5758 - in trunk/gnue-forms/src: . GFObjects |
Date: |
Sat, 24 Apr 2004 20:50:46 -0500 (CDT) |
Author: jamest
Date: 2004-04-24 20:50:45 -0500 (Sat, 24 Apr 2004)
New Revision: 5758
Modified:
trunk/gnue-forms/src/GFForm.py
trunk/gnue-forms/src/GFObjects/GFBlock.py
trunk/gnue-forms/src/GFObjects/GFField.py
Log:
fix for non transparent blocks causing traceback on nextEntry events
return empty string if field values are pulled via trigger before the resultSet
is functional
(IOW: Fix AttributeError: 'NoneType' object has no attribute 'current')
Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py 2004-04-24 21:49:57 UTC (rev 5757)
+++ trunk/gnue-forms/src/GFForm.py 2004-04-25 01:50:45 UTC (rev 5758)
@@ -329,6 +329,7 @@
# Buttons don't have a block, but also
# don't trigger a block change
blockChange = False
+ print type(widget)
pageChange = widget._page != self._currentPage
if fireFocusTriggers:
@@ -597,11 +598,11 @@
#
def nextEntry(self, reverse=False, first=False, onlyInBlock=False):
- if self._currentBlock.transparent and not onlyInBlock:
- source = self._currentEntry._page._focusOrder[:]
- else:
- source = self._currentBlock._focusOrder[:]
-
+ #if self._currentBlock.transparent and not onlyInBlock:
+ source = self._currentEntry._page._focusOrder[:]
+ #else:
+ # source = self._currentBlock._focusOrder[:]
+ # print source
# If we want the previous entry, then reverse the focusorder we're using
if reverse:
source.reverse()
@@ -614,6 +615,8 @@
if ((object._navigable) and ((not object.readonly) or
(self._currentBlock.mode=='query' and object._queryable))):
+ if (onlyInBlock or not self._currentBlock.transparent) and
(self._currentBlock.name != object.block):
+ continue
# If we only wanted the first navigable field in the block, then return
if first:
nextEntry = object
Modified: trunk/gnue-forms/src/GFObjects/GFBlock.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFBlock.py 2004-04-24 21:49:57 UTC (rev
5757)
+++ trunk/gnue-forms/src/GFObjects/GFBlock.py 2004-04-25 01:50:45 UTC (rev
5758)
@@ -184,7 +184,8 @@
events.EventAware.__init__(self, form._instance.eventController)
# Get all focusable items, ordered correctly
- self._focusOrder = self.getFocusOrder()
+ #self._focusOrder = self.getFocusOrder()
+
# Create a stub/non-bound datasource if we aren't bound to one
if not hasattr(self,'datasource') or not self.datasource:
Modified: trunk/gnue-forms/src/GFObjects/GFField.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFField.py 2004-04-24 21:49:57 UTC (rev
5757)
+++ trunk/gnue-forms/src/GFObjects/GFField.py 2004-04-25 01:50:45 UTC (rev
5758)
@@ -228,7 +228,10 @@
value = self._block._preCommitWorkingRecord.getField(self.field)
else:
+ if self._block._resultSet:
value = self._block._resultSet.current.getField(self.field)
+ else:
+ value = None
# TODO: part of the removed block check from above
#else:
# value = None
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r5758 - in trunk/gnue-forms/src: . GFObjects,
jamest <=