[Zope] ZCataloging without ZClasses
massimop at users.berlios.de
massimop at users.berlios.de
Tue Oct 12 16:13:08 EDT 2004
On Tue, 2004-10-12 at 19:11 +0200, Dieter Maurer wrote:
> Please stay on the list... readded...
sorry, it wasn't intentional
>
> massimop at users.berlios.de wrote at 2004-10-11 20:23 +0200:
> > ... cataloguing objects ...
> >now I know (I think) that I can use properties and call catalog_object
> >to put objects in the ZCatalog, but this isn't explained in that chapter
>
> It is not explained explicitely because it follows from
> basic principles:
>
> When an object "o" is indexed in an index "I", then
> "I" uses its name to obtain a value "v" from "o".
>
> The standard way is to use "o.I". If "o.I" is callable,
> it is called; otherwise, it is used directly -- in pseudo code:
>
> v = getattr(o, I.getId())
> if callable(v): v = v()
>
> This means that you can use anything that can be
> accessed in the form "o.I" or "o.I()".
>
> Properties, properties in PropertySheets (ZClasses) either of
> the object itself or acquired
> and methods, PythonScripts either on the object itself
> or acquired can be used to integrate the object with
> the ZCatalog.
>
please be patient (my english skill is giving a hard time...)
the indexing of properties was clear (somewhat...) to me
what I missed was a way to (re)index programmatically an object, but I
could as well have misred; if that's the case, I apologize....
thanks
massimo
More information about the Zope
mailing list