[Zope] Error with cut and paste

Michel Pelletier michel@digicool.com
Mon, 29 Nov 1999 16:57:30 -0500


> -----Original Message-----
> From: Jochen Knuth [mailto:jok-zope@ipro.de]
> Sent: Monday, November 29, 1999 1:59 PM
> To: zope
> Subject: Re: [Zope] Error with cut and paste
> 
> 
> Hi,
> 
> > > -----Original Message-----
> > > From: Jochen Knuth [mailto:jok-zope@ipro.de]
> > > Sent: Monday, November 29, 1999 12:09 PM
> > > To: zope
> > > Subject: [Zope] Error with cut and paste
> > >
> > >
> > > Hi,
> > >
> > > after some customizing of the KnowledgeKit Product, i can not cut
> and
> > > paste KnowledegeBaseEntries from one KnowledegeBase to another.
> > > I can copy and paste, delete, rename the KnowledgeBaseEntry.
> >
> > Catalog awareness breaks cut and paste.  I've recently 
> become aware of
> > this.  I'll be working on an fix but it won't be in 2.1.
> >
> > -Michel
> 
> Was this break introduced lately?

It's a fundamental design flaw.

> Because early last week i could cut and paste KBEntries. Maybe the
> ZCatalog wasn't active at this time (but i dont think so).
> I played around with some UserFolders and permissions (added a
> UserFolder at the same folder as the KBase, deleted it, created it at
> the top level, and so on)

Uhm... it depends on what superclass comes first when you create a
object manager ZClass.  CatalogAwareness overrides the cut/copy/paste
hooks to notify the catalog that the objects has moved, and thus changed
in some way and needs to be re-indexed (the Catalog allways must have
correct paths to objects).  ObjectManager obviously hooks these methods
to provide cut and paste functionality.  So when you subclass both, they
both override the same methods and whomever was subclassed first wins.
This means that ZClasses that are CAtalogAware and object managers have
trouble.  If the things you could cut and paste were simple Items, then
you wouldn't see this problem.

-Michel