[Zope] Moving Z Classes around

Brian Lloyd Brian@digicool.com
Mon, 26 Jun 2000 13:39:38 -0400


> Having discovered that [my] Z Class is in the wrong product, 
> I'd like to
> move it elsewhere.  The obvious thing to do is to use Cut + Paste;
> unfortunately, I get:
> 
> 	The item <my-item> does not support this operation.
> 
> (The function manage_copyObjects is not happy!)
> 
> I can't think of another way to move my classes without 
> rebuilding them --
> any advice?

Michael,

I agree that this is a pain, but it is a fact of life for now 
in ZClass development. ZClasses have a different relationship 
with other Zope objects than normal, in that other instances 
in the object space refer to them as their class. That makes 
picking them up and moving them something not to be done 
lightly. In the Python world, this would be equivalent to 
pickling a bunch of objects and then moving the class for 
those objects to a different package. Without some explicit 
action, all of the pickled objects would break because they 
would be referencing a class that is no longer there. 

It's the same deal with ZClasses. It may be possible in the 
future to move ZClasses around, but something will still need 
to be done about existing instances created from a class that 
moves. So far we have avoided the hard thinking required to 
solve that :^) This would be a good candidate for a proposal 
in the forthcoming ZopeDev area on Zope.org. More on that 
later...

Brian Lloyd        brian@digicool.com
Software Engineer  540.371.6909              
Digital Creations  http://www.digicool.com