[Zope] setting up a ZClass - base class of PropertyManager? plus weird gradual broken product messages
A M Thomas
am@virtueofthesmall.com
Sat, 20 Apr 2002 16:52:12 -0400
Hello there, and thank you very much in advance for any help.
I'm working on my Zope (2.5.0) product through the management interface,
and realized that if I just created a ZClass with base classes of
ObjectManager and CatalogAware, I couldn't add properties to it :( So,
I went to re-create my ZClass - and discovered that PropertyManager
isn't in the list of selectable base classes. Why is this? Is there
some way I can inherit directly from PropertyManager?
I went ahead and created it with an additional base class of
DTMLDocument, since it's got PropertyManager as one of its base classes,
but this isn't what I really want -- in addition to being slightly
inelegant, now the manage_findForm method doesn't appear in the
available methods for creating Views.
Must I create my product in Python only to get PropertyManager cleanly?
Would this even work? And would converting be easy?
Also, I noticed a curious effect: I re-created my ZClass by moving all
the methods into a temp ZClass, renaming the add and addform methods,
and saving out the Class ID, then deleting the ZClass and the remaining
constructor objects (Permission, and Factory). Then I created a new
ZClass with the same name as the old one, and put in the saved ClassID,
replaced the new Add and Addform methods with my original ones (by
deleting the new ones and renaming the original ones back to their
original names), and pasting in the methods again.
However, old instances of this ZClass _gradually_ started showing
"broken product" messages. First one, then overnight, two more - and
the first one didn't seem to change immediately. They shouldn't be
broken anyway, right? Is there some known issue about deleting and
re-creating ZClasses in a product? To make matters even more
interesting, now one of them isn't broken anymore. Yes, I've re-created
this ZClass more than once today, and this isn't a good diagnostic
report, I know, but I just wanted to know if anyone knew what might be
going on based on similar past experience.
Thanks,
Am