[Zope3-checkins] CVS: Zope3/src/zope/app - copypastemove.py:1.10.24.4

Jim Fulton jim at zope.com
Fri Sep 12 16:25:51 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app
In directory cvs.zope.org:/tmp/cvs-serv26253/src/zope/app

Modified Files:
      Tag: parentgeddon-branch
	copypastemove.py 
Log Message:
Got more tests passing

=== Zope3/src/zope/app/copypastemove.py 1.10.24.3 => 1.10.24.4 ===
--- Zope3/src/zope/app/copypastemove.py:1.10.24.3	Fri Sep 12 15:15:05 2003
+++ Zope3/src/zope/app/copypastemove.py	Fri Sep 12 16:25:20 2003
@@ -26,6 +26,9 @@
 from zope.proxy import removeAllProxies
 from zope.interface import implements
 from zope.exceptions import NotFoundError, DuplicationError
+from zope.app.location import locationCopy
+from zope.app.event import publish
+from zope.app.event.objectevent import ObjectCopiedEvent
 
 class ObjectMover:
     '''Use getAdapter(obj, IObjectMover) to move an object somewhere.'''
@@ -101,7 +104,7 @@
         new_name = chooser.chooseName(new_name, obj)
 
         copy = removeAllProxies(obj)
-        cppy = locationCopy(value)
+        cppy = locationCopy(copy)
         publish(target, ObjectCopiedEvent(copy))
 
         target[new_name] = copy
@@ -116,7 +119,7 @@
         Returns True if it can be copied there. Otherwise, returns
         False.
         '''
-        return obj.__parent__.__class__ is target.__class__ 
+        return self.context.__parent__.__class__ is target.__class__ 
 
 
 class PrincipalClipboard:




More information about the Zope3-Checkins mailing list