[Zope-dev] The object hierarchy

Michel Pelletier michel@digicool.com
Thu, 10 Jun 1999 14:58:35 -0400


> -----Original Message-----
> From: Mike Pelletier [mailto:mike@zopeware.com]
> Sent: Thursday, June 10, 1999 2:51 PM
> To: Michael Collins
> Cc: zope-dev@zope.org
> Subject: Re: [Zope-dev] The object hierarchy
> 
> 
> On Thu, 10 Jun 1999, Michael Collins wrote:
> 
> > I'm trying to navigate around the object hieararchy, and I 
> can find a
> > single object's subobjects by using hasattr and so on, but 
> what if I want
> > to navigate to a different position in the hieararchy?  As 
> far as I can
> > tell, objects don't have a pointer to their parent
> 
>     In fact, they do.  It's 'aq_parent'.
> 

If the parent inherits ExtensionClass.Base and the child inherits
Acquisition.Implicit (or Explicit).  'aq_parent' is an attribute of an
acquisition wrapped object.

-Michel

> Mike.
> 
> -- 
>        ---              | Mike Pelletier             Work: 
> 519-746-1607
>         /opeware!       | Software Developer         Home: 
> 519-725-7710
>        ---              | mike@zopeware.com           Fax: 
> 519-746-7566
> http://www.zopeware.com | Zopeware is not endorsed by Digital 
> Creations
> 
> 
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://www.zope.org/mailman/listinfo/zope-dev
> 
> (For non-developer, user-level issues, use the companion list,
> zope@zope.org, http://www.zope.org/mailman/listinfo/zope )
>