[Zope] Getting result object from ZCatalog

James W. Howe jwh@allencreek.com
Mon, 17 Jan 2000 15:19:08 -0500


I have just started experimenting with ZCatalog and I have a question.  I 
know from reading various things that if I use something like this:

Catalog(meta_type='Foo')

I will get a collection of objects which lets me access information 
contained in the Catalog about objects with the meta_type of 'Foo'.  I know 
that the results are not the actual objects themselves.  I also know that I 
can get the path to the actual item by using 
getpath(data_record_id_).  However, what I would like to be able to do is 
actually get to the real object so that I can get properties or evaluate 
methods which exist for the object.  I don't want to include the additional 
information in my ZCatalog.  I tried using something like this:

<dtml-with "Catalog.getpath(data_record_id_)">
<dtml-var SomeUnCatalogedProperty>
</dtml-with>

but when I evaluate the method I get a KeyError.  Is there some way to use 
a ZCatalog to get to the actual instance of the object which was cataloged?

Thanks.

James W. Howe				mailto:jwh@allencreek.com
Allen Creek Software, Inc.		pgpkey: http://ic.net/~jwh/pgpkey.html		
Ann Arbor, MI  48103