Thank you Laurie, I hadn't gotten a response yet, and yours is more informative. But still,. what I was asking for (and hoping for) is a complete code example of the entire method, not just a list of steps of what I need to do inside of it. Can you pass on a complete code example? Also -- am I overriding TWO methods, or just one? I can think of one method needed to display the form (and populate the fields if this is "edit" instead of "add"), and another method to accept the form and populate the database. I was just asking for a complete code example of the method, or both methods as the case may be. Thanks, Bryan On Mon, 2001-10-01 at 07:57, Laurie Nason wrote: Hi Bryan - sorry if you have this solved by now - but I didn't see any reply to the mail below. What Chris is trying to say (I think) is that within the ZClass that you created, you need to create a dtml method that allows you to edit the properties of your ZClass. Here's what I usually do: ---I copy the add form I use to add a new instance and paste it inside the ZClass object (in Products folder). (I tend to call mine index_edit_html). ---Inside this dtml method, I set the properties of the various text boxes, select lists etc to the values of the instance of the zclass. ---In the same place as where you copied the form you just created create another method (I call mine ZClassName_Update). ---Inside this method call the two functions that Chris mentioned e.g. <dtml-call expr="propertysheets.Basic.manage_changeProperties(REQUEST)"> <dtml-call expr"reindex_object()"> hth, Laurie -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Bryan Field-Elliot Sent: Saturday, September 29, 2001 5:54 PM To: chrism@zope.com Cc: zope@zope.org Subject: Re: [Zope] CatalogAwareBase doesn't auto-reindex? OK Chris, I understand what you're saying. But my follow-on question is, where exactly can I find the code that is auto-generated from the properties interface? And if there is no such code, then is there a complete code sample, somewhere, of how I would code this myself? Your statement: You need to create a custom properties-editing form with a target that calls reindex_object as well as modifying the properties." isn't really enough for a newbie like me to pick up and run with. I'm also unclear where this prebuilt form is being built -- is it when I define the property sheet, or instead is it when I create a view out of a property sheet? Having fun getting to know this system! Bryan On Sat, 2001-09-29 at 16:14, Chris McDonough wrote: Hi Bryan, Please keep the mail on the maillist, thanks. This is a limitation when using prebuilt forms from the properties interface. The prebuilt propertysheet editing forms don't call reindex_object. You need to create a custom properties-editing form with a target that calls reindex_object as well as modifying the properties. You could make the target a Python Script or a DTML method, as long as it calls the right stuff (manage_changeProperties and reindex_object) on itself with the right values. HTH! - C Bryan Field-Elliot wrote: > Thanks, > > Where do I place this call? There are no methods to modify, except the > constructor. The constructor isn't the appropriate place, I think. > > Thanks, > > Bryan > > On Sat, 2001-09-29 at 16:04, Chris McDonough wrote: > > /I think you need to call "reindex_object" on your catalogaware object / > /manually... it indexes itself automatically but doesnt reindex itself / > /automatically./ > // > /See http://www.zope.org/Members/AlexR/CatalogAware for more info.../ > // > /Bryan Field-Elliot wrote:/ > /> Hi,/ > /> / > /> I'm new to Zope -- let me first say, I'm totally blown away! I come from / > /> a Java/JSP/Servlet world, and Zope is just blowing my mind!/ > /> / > /> I am using the latest Zope release (downloaded and installed yesterday)./ > /> / > /> I am trying to use ZCatalog, and CatalogAwareBase as a base class for my / > /> custom ZObject./ > /> / > /> I have successfully managed to get things straight so that my catalog / > /> notices whenever I create new instances of my custom classess (I had to / > /> call my catalog "Catalog"). The new instances correctly show up in the / > /> "Catalog" tab of my Catalog./ > /> / > /> However, I am having a terrible time trying to get the Catalog to / > /> automatically re-index objects when I modify them. I am using standard / > /> property sheet editor page generated in the Product config area for my / > /> object class. Is this the wrong thing to do?/ > /> / > /> It's hard to imagine the usefulness of the ZCatalog without it being / > /> up-to-date when objects change. I guess I'm just used to the RDBMS world / > /> where this is completely expected behavior./ > /> / > /> I can't tell if this is a bug in CatalogAwareBase, or else if the / > /> documentation is lacking./ > /> / > /> Thanks,/ > /> / > /> Bryan/ > /> / > /> / > // > // > /-- / > /Chris McDonough Zope Corporation/ > /http://www.zope.org http://www.zope.com/ > /"Killing hundreds of birds with thousands of stones"/ > // > -- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones" _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )