At 23:28 13/10/99 , gtk wrote:
In your container class' constructor (MyContainerClass_add), you can programatically create a ZCatalog instance as a subobject, and setup its indexes and metadata automatically.
Cute technique!
I tried deriving a ZClass from ZCatalog to do the column and index management itself -- the idea was that I could update all of the FnordCatalogs' designs and methods just by touching one object -- but for some reason it runs right into a wall. Yell if you can read tracebacks; I can reproduce it pretty damn quickly.
Uh, fine. At the moment, I'm only editing my Fnords via their Properties view. How do I doctor the view so that index_object is called?
Havn't got that far yet - my objects are static though so that is for a future project :-) You will probably need to write your own form that submits the results to a DTML method that calls index_object and manage_editProperties.
Oh, so I can't use views if I want to do that kind of thing?
I have a project in development right now that uses a ZClass based on ZCatalog and ObjectManager. Works great. In it I have one ZClass that inherits from CatalogAware, and with some twiddling in the constructor methods instances of the CatalogAware classes are indexing themselves in the container ZClass just fine. -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------