[Zope3-checkins] CVS: Zope3/src/zope/app/container - contained.py:1.14 dependency.py:1.12

Jim Fulton jim at zope.com
Sat Mar 6 12:49:20 EST 2004


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

Modified Files:
	contained.py dependency.py 
Log Message:
Changed most calls to queryAdapter to use interface calls instead.


=== Zope3/src/zope/app/container/contained.py 1.13 => 1.14 ===
--- Zope3/src/zope/app/container/contained.py:1.13	Fri Mar  5 23:17:22 2004
+++ Zope3/src/zope/app/container/contained.py	Sat Mar  6 12:48:47 2004
@@ -448,10 +448,10 @@
     setitemf(name, object)
     if event:
         if event.__class__ is ObjectAddedEvent:
-            a = zapi.queryAdapter(object, IAddNotifiable)
+            a = IAddNotifiable(object, None)
             if a is not None:
                 a.addNotify(event)
-        a = zapi.queryAdapter(object, IMoveNotifiable)
+        a = IMoveNotifiable(object, None)
         if a is not None:
             a.moveNotify(event)
         publish(container, event)
@@ -562,10 +562,10 @@
         return
 
     event = ObjectRemovedEvent(object, oldparent, oldname)
-    a = zapi.queryAdapter(object, IRemoveNotifiable)
+    a = IRemoveNotifiable(object, None)
     if a is not None:
         a.removeNotify(event)
-    a = zapi.queryAdapter(object, IMoveNotifiable)
+    a = IMoveNotifiable(object, None)
     if a is not None:
         a.moveNotify(event)
     publish(container, event)


=== Zope3/src/zope/app/container/dependency.py 1.11 => 1.12 ===
--- Zope3/src/zope/app/container/dependency.py:1.11	Tue Mar  2 13:50:57 2004
+++ Zope3/src/zope/app/container/dependency.py	Sat Mar  6 12:48:47 2004
@@ -33,7 +33,7 @@
 
     def notify(self, event):
         object = removeAllProxies(event.object)
-        dependency = zapi.queryAdapter(object, IDependable)
+        dependency = IDependable(object, None)
         if dependency is not None:
             dependents = dependency.dependents()
             if dependents:




More information about the Zope3-Checkins mailing list