On Mon, 20 Nov 2000, Toby Dickenson wrote:
> On Thu, 16 Nov 2000 19:51:24 -0500, Tres Seaver <[EMAIL PROTECTED]>
> wrote:
<snip>
> >Correct in theory, but broken in practice: if you make your
> >ZClass persistent (i.e., you leave checked the "Include
> >standard Zope persistent object base classes?" checkbox on the
> >"Add ZClass form), then Persistent will be the first base
> >class in the list, and *your* '__setstate__' will never be
> >called!
>
> Some more theory thats not backed up by any practical
> experience in this area: Would it be sufficent to create a base
> class that derives from Persistent and then uncheck the box? or
> does that checkbox get involved in some other magic?
Actually, I was mistaken. I was spelunking through the ZClass
code (.../lib/python/ZClasses/*.py) this weekend, working on my
filesystem dumper; *all* ZClasses declare
ZClasses.ZClass.PersistentClass as the first class in their base
class list; this class derives only from ExtensionClass.Base,
and not from Persistence.Persistent; I don't any longer know
*why* my ZClasses' '__setstate__' would not be called! The
'zope_object' flag passed to 'manage_addZClass' causes
OFS.SimpleItem.Item to be *appended* to the base class list (so
it should have no effect on the '__setstate__' lookup).
Tres.
--
===============================================================
Tres Seaver [EMAIL PROTECTED]
Digital Creations "Zope Dealers" http://www.zope.org
_______________________________________________
Zope-Dev maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )