[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r8729 - in trunk/gnue-forms/src: . GFObjects
From: |
reinhard |
Subject: |
[gnue] r8729 - in trunk/gnue-forms/src: . GFObjects |
Date: |
Tue, 10 Oct 2006 11:24:02 -0500 (CDT) |
Author: reinhard
Date: 2006-10-10 11:23:59 -0500 (Tue, 10 Oct 2006)
New Revision: 8729
Modified:
trunk/gnue-forms/src/GFForm.py
trunk/gnue-forms/src/GFObjects/GFField.py
trunk/gnue-forms/src/GFObjects/GFTabStop.py
Log:
Made updateUIEntry obsolete by adding the functionality directly to GFField.
Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py 2006-10-10 16:09:50 UTC (rev 8728)
+++ trunk/gnue-forms/src/GFForm.py 2006-10-10 16:23:59 UTC (rev 8729)
@@ -1473,21 +1473,6 @@
# -------------------------------------------------------------------------
- # Updates every UI entry of a field.
- # -------------------------------------------------------------------------
-
- def updateUIEntry(self, field):
- """
- Updates every UI entry of a field.
- @param field: the field object whose ui is to be refreshed
- @return: None
- """
- for entry in field._entryList:
- self.dispatchEvent('updateENTRY', entry, _form=self)
- #self._instance.dispatchEvent('updateENTRY',entry, _form=self)
-
-
- # -------------------------------------------------------------------------
# Called whenever an event source has requested that the
# focus change to the next data entry object
# -------------------------------------------------------------------------
Modified: trunk/gnue-forms/src/GFObjects/GFField.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFField.py 2006-10-10 16:09:50 UTC (rev
8728)
+++ trunk/gnue-forms/src/GFObjects/GFField.py 2006-10-10 16:23:59 UTC (rev
8729)
@@ -321,12 +321,14 @@
This function gets called whenever the user interface has to be
updated.
"""
- self._block._form.updateUIEntry(self)
# If the field is a foreign key, move the result set to the
# selected value.
if hasattr(self, '_GFField__fk_resultSet'):
self.__fk_resultSet.findRecord({self.fk_key: self.getValue()})
+ # This will cause __refresh_ui() to be called via __dsCursorMoved
+ else:
+ self.__refresh_ui()
# -------------------------------------------------------------------------
@@ -356,10 +358,14 @@
def __dsCursorMoved(self, event):
+ # This is called when the cursor of the *foreign key* result set moved.
+ # Example: two dropdowns are bound to the same database field, when
+ # changing the value of one dropdown, the other dropdown follows
+ # through this method.
# The entry causing the fk record change has already posted a setValue
# for this field; our current record already contians the correct data.
# All we have to do is tell our UI to update.
- self._block._form.updateUIEntry(self)
+ self.__refresh_ui()
# -------------------------------------------------------------------------
@@ -410,7 +416,16 @@
self.__fk_resultSet.findRecord({self.fk_key: self.getValue()})
+ # -------------------------------------------------------------------------
+ # Refresh the user interface with a changed field value
+ # -------------------------------------------------------------------------
+ def __refresh_ui(self):
+
+ for entry in self._entryList:
+ entry.refresh_ui_current()
+
+
# =========================================================================
# Trigger functions
# =========================================================================
Modified: trunk/gnue-forms/src/GFObjects/GFTabStop.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFTabStop.py 2006-10-10 16:09:50 UTC (rev
8728)
+++ trunk/gnue-forms/src/GFObjects/GFTabStop.py 2006-10-10 16:23:59 UTC (rev
8729)
@@ -223,6 +223,14 @@
# -------------------------------------------------------------------------
+ # Refresh the user interface with the current field data for current row
+ # -------------------------------------------------------------------------
+
+ def refresh_ui_current(self):
+
+ self.refresh_ui(self._visibleIndex, self._visibleIndex)
+
+ # -------------------------------------------------------------------------
# Refresh the user interface with the current field data
# -------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r8729 - in trunk/gnue-forms/src: . GFObjects,
reinhard <=