[Zope-dev] Catalog aware ZClass

Michel Pelletier michel@digicool.com
Tue, 6 Jul 1999 08:39:44 -0400


> -----Original Message-----
> From: Jason Spisak [mailto:webmaster@mtear.com]
> Sent: Monday, July 05, 1999 6:31 PM
> To: zope-dev@zope.org
> Subject: [Zope-dev] Catalog aware ZClass
> 
> 
> Michel:
> 
> Thanks for the Findable base class ideas.  I attempted to create a
> Findable class and made a small mistake.  I named the method 
> to perform
> deletion "delete"  Of course now anyhting to do with that object
> produces a KeyError.  I can't delete it, or look inside it.   Just a
> heads up on the taboo name "delete" in ZClasses.  Is there any other
> taboo names I should be aware of?  
> 

Hmm.  I'm a little lost here, you created a Findable ZClass with a
delete method, and that broke?  I'm not sure how, I don't think 'delete'
is a special word of any kind.  Just for safties sake however, you might
want to come up with more obfusicated nameds.

> Also you mentioned add, delete and findable methods for this 
> base class.
>  Doesn't adding something to the Catalog automatically render it
> findable? 
> 

Yep, 'Findable' is just a handy name for a base class that defines the
attributes you want to find.  It is possible for you to add indexes that
don't correlate with the Findable class, and conversely it is possible
for Findable to define attributes that the catalog doesn't look for.
The two are unconnected, it's just handy to keep all of your 'Findables'
in one base class, that way lots of different kinds of ZClasses can
subclass Findable and thus work seamlessly with your existing catalogs.

-Michel

PS Catalog beta is around the corner, expect it with the next Zope
alpha.


> All my best,
> 
> -- 
> Jason Spisak
> webmaster@mtear.com
> 
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://www.zope.org/mailman/listinfo/zope-dev
> 
> (For non-developer, user-level issues, use the companion list,
> zope@zope.org, http://www.zope.org/mailman/listinfo/zope )
>