[Zope] Re: ZCatalog and ZClasses

Michel Pelletier michel@digicool.com
Wed, 21 Jul 1999 01:51:06 -0400


Alex Rice wrote:
> 
> [was "ZCatalog and acquired objects"]
> 
> On Tue, 20 Jul 1999 04:04:12 -0400,
> Michel Pelletier <michel@digicool.com> said:
> 
> Michel> it's own objects in a sane way that makes much mroe sense to you
> Michel> than just a vast object sweep.  This works reather well with
> Michel> ZClasses; you can define your own Zope objects and modify their
> Michel> constructors so that they catalog and uncatalog themselves.
>         ^                                                        ^
> 
> Cool! I would LOVE to see a code snippet for this. This is what I tried
> in my constructor, but it didn't work:
> 

There will be a howto I'll start working on soon.

> <!--#with "myZClass.createInObjectManager(REQUEST['id'], REQUEST)"-->
> <!--#call "stealth_catalog.manage_catalogObject(REQUEST,[absolute_url()])"-->
> <!--#/with-->
> 
> This doesn't create the object at all, apparently.
> 
> I have some ZCatalogs which work with ZClasses, but I don't see quite
> how to automate adding/removing objects from the Catalogs.
> 
> Thanks bunches.
> 

What will probably be the case is that I'll develop a base class that
your ZClasses can subclass that provides a simple framwork for your
ZClass instances to automaticly catalog themselves; currently, it's a
pretty involved and complex process, it should be made easier.  I'm for
rolling the Catalog into the Zope core, but this might not happen until
the release after 2.0 final, there is still alot of XMLish stuff that
should be matured in respect to the catalog before it is worked into the
core infrastructure.  I would like to see Catalog be integrated into
Zope much like authentication is, so that there will be a top level
catalog much like the top level acl_users User Folder.  This many not be
how it actually turns out however.

-Michel