[Zope3-checkins] CVS: Zope3/src/zope/proxy/context - decorators.txt:1.1.2.8

Steve Alexander steve@cat-box.net
Mon, 19 May 2003 08:29:32 -0400


Update of /cvs-repository/Zope3/src/zope/proxy/context
In directory cvs.zope.org:/tmp/cvs-serv5095/src/zope/proxy/context

Modified Files:
      Tag: stevea-decorators-branch
	decorators.txt 
Log Message:
Added note about mixin classes implementing things.


=== Zope3/src/zope/proxy/context/decorators.txt 1.1.2.7 => 1.1.2.8 ===
--- Zope3/src/zope/proxy/context/decorators.txt:1.1.2.7	Mon May 19 07:20:25 2003
+++ Zope3/src/zope/proxy/context/decorators.txt	Mon May 19 08:29:31 2003
@@ -85,12 +85,13 @@
 The notional class ContextDecoratedFolder, made up at runtime by the
 decorator composite object, realizes both IFolder and IZopeContainer.
 
-(Marius writes:
-  XXX I'm still in two minds about decorator mixins claiming that they
-      implement IFoo when they really implement only a part of it.  It is
-      really the notional composite class that implements it fully.)
+Note that a decorator mixin class can claim to implement a particular
+interface, but instances of the mixin class cannot on their own fulfil the
+promises made by the interface. However, when used as intended as part of a
+decorator, the mixin does provide the means to fulfil the delcared promises.
 
- 
+In this sense, the mixin class is like a conventional OO mixin -- it is not
+meant to be used outside of its intended context.
 
 [Insert decorator object diagram.]
 
@@ -298,7 +299,7 @@
 
 Previously, both cases were handled by zope.proxy.context.ContextWrapper.
 Now, the former case is handle by ContextWrapper, and the latter case is
-handled by zope.prox.context.ensureContextWrapped.
+handled by zope.proxy.context.ensureContextWrapped.
 This was necessary anyway to allow content classes to take on some of their
 own context-dependent behaviour, without having the traversal code double-
 wrap the results.