[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Variables and Advanced DTML

webmaster@zope.org webmaster@zope.org
Tue, 24 Sep 2002 13:46:22 -0400

A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/AdvDTML.stx#3-27


      As you saw in Chapter 4, "Dynamic Content with DTML", if Zope
      cannot find a variable in the client object, it searches through
      the object's containers.  Zope uses acquisition to automatically
      inherit variables from the client object's containers.  So when
      Zope walks up the object hierarchy looking for variables it
      always starts at the client object, and works its way up from

        % Anonymous User - Sep. 24, 2002 1:46 pm:
         Since the client object is located in the ZODB, it has a location in the ZODB (denoted by its URL); it also
         implies the object is located in a container.
         In that case, if Zope can not find the variable *in* the client object (*context*), Zope will also look up
         the variable in the *container* of the object.
         ? is acquisition used exclusively for the client object only in the namespace?

         ? when i take http://www.zopeonarope.com/Misc/chapters8-10.pdf page 199-211,
         acquisition not only travels upwards the container hierarchy to the root, 
         but also the PARENT hierarchy given by the URL.
         Some aspects of acquisition are still a mystery for me. Since acquisition is so central, if it is not
         explained proper here, where shall i look?
         "Zope uses acquisition to ... *inherit*": Inheritance is AFAIK already used for class derivation.