[Zope] Catalog-aware ZClass not getting indexed?

Evan Simpson evan@digicool.com
Mon, 14 Feb 2000 23:28:58 -0600


----- Original Message -----
From: Darran Edmundson <Darran.Edmundson@anu.edu.au>
>     instance = archive.Control_Panel.Products.myClass(id)
>
> Can someone pin down why myClass works perfectly through the management
> interface but not via this external method?  Specifically what is
> missing in my external method that is causing my instance to not get
> past the hasattr test?  Thanks very much for any help you can provide.

It's testing to see if it can acquire the ZCatalog which it has been told to
use.  Since your newly created object is bare and without acquisition
context of any sort, this fails.

I *think* that what you want to do is:

instance = instance.__of__(container)

...right before you start playing with the index methods.

Cheers,

Evan @ digicool