The object hierarchy
I've been fiddling with zope for about a week now, and I'm just trying to figure out this little hole in the object hierarchy so that I can get relly working on my project. I'm not entirely sure what vocabulary to use yet, so please bear with me. 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, so I've got a couple of options - find the root (which is preferable), or stuff an arbitrary root into a global variable for later use. Ideally, I'd like the former course.
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'. 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
participants (2)
-
Michael Collins -
Mike Pelletier