Author: reinhard
Date: 2007-01-26 18:34:08 -0600 (Fri, 26 Jan 2007)
New Revision: 9339

Modified:
   trunk/gnue-common/src/definitions/GParserHelpers.py
Log:
Do not copy _trigger... methods on assignment, they contain method pointers
pointing to the wrong (old) "self".


Modified: trunk/gnue-common/src/definitions/GParserHelpers.py
===================================================================
--- trunk/gnue-common/src/definitions/GParserHelpers.py 2007-01-26 23:11:58 UTC 
(rev 9338)
+++ trunk/gnue-common/src/definitions/GParserHelpers.py 2007-01-27 00:34:08 UTC 
(rev 9339)
@@ -137,6 +137,8 @@
 
     # Assign everything except the parent and the children
     for (name, value) in source.__dict__.items ():
+      # FIXME: better simply copy all attributes not starting with _? Maybe
+      # call buildObject afterwards?
       if name in ['_ParserObj__parent', '_children']:
         continue
       # Do not copy "magic" attributes, they are reserved for Python
@@ -146,6 +148,9 @@
       # methods of the source object!
       if name == '_inits':
         continue
+      # Also do not copy the trigger stuff, it also contains method pointers!
+      if name.startswith('_trigger'):
+        continue
 
       self.__dict__ [name] = value
 



_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue

Reply via email to