[Zope] Attribute Error while adding ZSearch Interface
Dieter Maurer
dieter@handshake.de
Thu, 24 Apr 2003 21:48:58 +0200
Shashank Ashtikar wrote at 2003-4-24 12:10 +0530:
> ...
> > Looks at if your "Catalog" instance were broken:
> >
> > "ZCatalog" is a tiny wrapper around "Catalog".
> > The "Catalog" instance is maintained as "_catalog" of
> > the "ZCatalog" instance.
> >
> > Is your "ZCatalog" usable at all? (I doubt it).
>
> The ZCatalog is usable but error in my opinion is some where else.
> I came to this conclusion after doing some more hacking on the problem.
>
> This what is puzzling me:
>
> I have a python class which inherits from ZCatalog I have lot of
> instances of this class. Thus in the add form for ZSearch Interface
> all these instances were being listed. So when I choose one of these
> instances I get the mentioned attribute error. But when I choose a actual
> ZCatalog instance the form woks perfectly fine. I can do with this.
This means, you inherited "ZCatalog" but did not call its
"__init__" method.
When you override a method, it is sometime necessary to
call the method of the inherited class in your class...
Dieter