[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7447 - in trunk/gnue-common/src/datasources: . drivers/Base
From: |
reinhard |
Subject: |
[gnue] r7447 - in trunk/gnue-common/src/datasources: . drivers/Base |
Date: |
Wed, 20 Apr 2005 17:36:03 -0500 (CDT) |
Author: reinhard
Date: 2005-04-20 17:36:02 -0500 (Wed, 20 Apr 2005)
New Revision: 7447
Modified:
trunk/gnue-common/src/datasources/GDataSource.py
trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py
Log:
DataSource can notify listeners itself.
Modified: trunk/gnue-common/src/datasources/GDataSource.py
===================================================================
--- trunk/gnue-common/src/datasources/GDataSource.py 2005-04-20 22:16:59 UTC
(rev 7446)
+++ trunk/gnue-common/src/datasources/GDataSource.py 2005-04-20 22:36:02 UTC
(rev 7447)
@@ -507,7 +507,12 @@
resultSet.merge (newResultSet)
newResultSet.close ()
+ # If this is the current result set, then the UI has to follow the changes.
+ # FIXME: this should be a different method than for a new result set.
+ if resultSet == self._currentResultSet:
+ self.__notifyResultSetListeners ()
+
# ---------------------------------------------------------------------------
# Create an empty result set
# ---------------------------------------------------------------------------
@@ -527,14 +532,14 @@
def _activateResultSet (self, resultSet):
self._currentResultSet = resultSet
- self.notifyResultSetListeners ()
+ self.__notifyResultSetListeners ()
# ---------------------------------------------------------------------------
# Notify everybody who's interested in newly loaded result sets
# ---------------------------------------------------------------------------
- def notifyResultSetListeners (self):
+ def __notifyResultSetListeners (self):
for listener in self._resultSetListeners:
listener (self._currentResultSet)
Modified: trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py 2005-04-20
22:16:59 UTC (rev 7446)
+++ trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py 2005-04-20
22:36:02 UTC (rev 7447)
@@ -652,12 +652,6 @@
# We are completely up to date now.
self.__recordsToRequery = []
-
- # Finally, tell everyone who wants to know that we have become a "new
- # ResultSet" (i.e. the complete data should be redisplayed).
- if self.__dataSource is not None:
- self.__dataSource.notifyResultSetListeners ()
-
self.__sync ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7447 - in trunk/gnue-common/src/datasources: . drivers/Base,
reinhard <=