E&S CVS Commit: PEAK - First phase of descriptor refactoring. Once bindings now place a proxy for

pje at eby-sarna.com pje at eby-sarna.com
Mon Jun 16 17:29:00 EDT 2003

Module Name:	PEAK
Committed By:	pje
Date:		Mon Jun 16 21:37:39 UTC 2003

Modified Files:
	PEAK/src/peak/binding: _once.c _once.pyx components.py once.py

Log Message:
First phase of descriptor refactoring.  Once bindings now place a proxy for
themselves in a class when activated in that class.  This avoids the need
for Once-derivatives to "copy" themselves when they are found under more
than one name (e.g in the same class or when they are created without a
name initially).  Eventually this will let us do something similar with
model.StructuralFeature objects.  Added hooks to the Once class family to
allow an 'onSet()' method to be called that can alter a value being
setattr'd.  This will let us do automatic 'adapt()' and
'setParentComponent()' when attributes are set or looked up.

Also, simplified the structure of the Pyrex OnceDescriptor base, using
Pyrex 0.7.2's ability to declare C-level attributes visible from Python.
(Previously, we used a custom descriptor to deal with this.)

NOTE: Error checking of bindings is partly BROKEN right now; bindings do
not verify that they haven't been placed in a class that doesn't support
them; they only verify that they have been told what name to use.  This
needs a little review, and the tutorial may need to be adjusted as well.

To view diffs of this commit, you can use the following URL(s):

To generate a diff of this commit:
cvs rdiff -r1.7 -r1.8 PEAK/src/peak/binding/_once.c \
cvs rdiff -r1.118 -r1.119 PEAK/src/peak/binding/components.py
cvs rdiff -r1.51 -r1.52 PEAK/src/peak/binding/once.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

More information about the source-changes mailing list