Re: [Zope] Adding a ZClass to a specific location
I've actually redesigned my product to have nested ZClasses (which I am finding out now are impossible to add when inherited). I have a structure like this: MyProduct ZClass1 MyBaseClass InsideBase InheritedFromInsideBase (I'm trying to create a ZClass2 instance inside here) ZClass2 I can create ZClass1 instance anywhere I want because they are at the top level of my product. But anytime I call the add form for ZClass2 inside my inherited class it creates the instance inside MyBaseClass rather than inside InheritedFromInsideBase. This is probably making no sense. Anyone who has had success with nesting ZClasses out there feel free to jump in. All my best, Kevin Dangoor writes:
Hi, Jason
I don't think it's a lost cause, per se. I'm just not really sure how to fix it. I've actually been thinking about making my own CatalogAware base class. My main purpose in changing it would be to make cataloging to catalogs other than "Catalog" work better. (Right now, your instance gets added to Catalog, then you need to remove it, set the proper catalog, then reindex the object. This doesn't work well at all with Versions.)
You may be able to hack your own CatalogAware such that you can control this aspect of cataloging. Or, something that requires a bit deeper Zen, you could try making an External Method that saves the path, changes it, adds the ZClass instance, and then sets the path back.
Not sure what the best way to accomplish this is, though...
Kevin
----- Original Message ----- From: "Jason Spisak" <jason@mtear.com> To: "Kevin Dangoor" <kid@kendermedia.com> Sent: Wednesday, January 05, 2000 1:23 PM Subject: Re: [Zope] Adding a ZClass to a specific location
Yeah, it's Catalog Aware. I was having that problem with another application. The Catalog was Cataloging the wrong path. Actually FolderA and FolderB are in different parts of the hirearchy. It's sort of like a trigger in one part of the ZODB causes something in another part to get created. Do you think this is a lost cause?
Jason Spisak
participants (1)
-
Jason Spisak