[Zope] A different ObjectManager question regarding zClasses.

Dieter Maurer dieter@handshake.de
Sun, 9 Sep 2001 20:27:18 +0200 (CEST)


Trevor Toenjes writes:
 > I redid the property sheet in an existing zClass, which affected the "views
 > tabs".
Not sure, what you mean with "view tabs"...

 > The old zClass objects do not show the new "view tabs" in their management
 > view.    They only show [Edit] and [Contents].  Oddly, clicking [Contents]
 > shows the new views tabs, but they dont work...?!!
I just tried it:

  I added a new view in the ZClass's "Views" tab, made it
  the first view and looked at an old instance.
  As expected (and hoped for), the old instances have the
  new view. And the view works.

Thus, I cannot reproduce your findings (ZopeCVS, Python 2.1.1, Linux2).
  
 > Why has this happened?
 > Do I have to redo my old zClass objects, or is there a workaround?
There is one issue:

  If you modify the default property value in a ZClass after
  you modified in an instance another property governed by the same
  property sheet, then the new default value may not show up
  in this instance. The reason is simple:
  When the "editPropertySheetForm" is submitted, it sends
  values for all properties not just the modified ones.
  "manage_changeProperties" instantiates all these values
  into the instance. From then on, the default value
  provided by the class is no longer relevant, because
  the instance has its own value.

 > So far, zClasses seem extremely unforgiving.  I have yet to successfully
 > rebase one.
You read the list (not only your own posts and replies)?
This was recently discussed. It is possible (HowTo on "zope.org"
and mailing list archives), although not easy.


Dieter