commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r7092 - trunk/gnue-appserver/src


From: reinhard
Subject: [gnue] r7092 - trunk/gnue-appserver/src
Date: Fri, 4 Mar 2005 17:04:27 -0600 (CST)

Author: reinhard
Date: 2005-03-04 17:04:27 -0600 (Fri, 04 Mar 2005)
New Revision: 7092

Modified:
   trunk/gnue-appserver/src/data.py
   trunk/gnue-appserver/src/geasInstance.py
Log:
Do not trigger OnChange for modifications done in OnInit.


Modified: trunk/gnue-appserver/src/data.py
===================================================================
--- trunk/gnue-appserver/src/data.py    2005-03-04 23:03:34 UTC (rev 7091)
+++ trunk/gnue-appserver/src/data.py    2005-03-04 23:04:27 UTC (rev 7092)
@@ -194,8 +194,12 @@
     """
     Returns the status of the given row. Returns one of the following results:
 
-    'inserted': newly created record
+    'initializing': newly created record with initialization not yet finished
 
+    'initialized': newly created and initialized records with no modifications
+
+    'inserted': newly created record with modifications
+
     'changed': existing record with modifications
 
     'deleted': deleted record

Modified: trunk/gnue-appserver/src/geasInstance.py
===================================================================
--- trunk/gnue-appserver/src/geasInstance.py    2005-03-04 23:03:34 UTC (rev 
7091)
+++ trunk/gnue-appserver/src/geasInstance.py    2005-03-04 23:04:27 UTC (rev 
7092)
@@ -277,7 +277,9 @@
       if record is None or record.getField (u'gnue_id') != __value:
         raise PropertyValueError, (propertydef.fullName, value)
 
-    if regular:
+    # Do not call OnChange triggers while in OnInit code and when setting
+    # time/user stamp fields
+    if regular and self.status () != 'initializing':
       for proc in self.__classdef.procedures.values ():
         if proc.gnue_name.upper () == 'ONCHANGE':
           self.call (proc, {}, {'oldValue': self.__getValue (propertyname),
@@ -440,10 +442,19 @@
 
   def status (self):
     """
-    This function returns the current state of the encapsulated record in the
-    cache.
+    This function returns the current state of the instance.
 
-    @return: state of the record in the cache
+    @return: state of the instance:
+
+    'initializing': new instance, OnInit still running
+
+    'initialized': new instance, OnInit finished, but no other modifications
+
+    'inserted': new instance, already modified
+
+    'changed': existing instance with modifications
+
+    'deleted': deleted instance
     """
 
     return self.__record.status ()





reply via email to

[Prev in Thread] Current Thread [Next in Thread]