[Zope3-checkins] CVS: Zope3/src/zope/component - __init__.py:1.12.14.1 interfaces.py:1.13.4.1

Jim Fulton jim at zope.com
Mon Sep 8 15:22:25 EDT 2003


Update of /cvs-repository/Zope3/src/zope/component
In directory cvs.zope.org:/tmp/cvs-serv20092/src/zope/component

Modified Files:
      Tag: parentgeddon-branch
	__init__.py interfaces.py 
Log Message:
Checking in work in progress on parentgeddon-branch so Fred can help
me to get the tests passing.  Specific log entries will be provided
when we merge this into the head.


=== Zope3/src/zope/component/__init__.py 1.12 => 1.12.14.1 ===
--- Zope3/src/zope/component/__init__.py:1.12	Fri Jul 11 21:22:13 2003
+++ Zope3/src/zope/component/__init__.py	Mon Sep  8 14:21:55 2003
@@ -141,15 +141,19 @@
 # View service
 
 def getView(object, name, request, context=None):
-    if context is None:
-        context = object
-    return getService(context, 'Views').getView(object, name, request)
+    v = queryView(object, name, request, context=context)
+    if v is not None:
+        return v
+    
+    raise ComponentLookupError("Couldn't find view", context, name)
 
 def queryView(object, name, request, default=None, context=None):
     if context is None:
         context = object
     return getService(context,
                       'Views').queryView(object, name, request, default)
+
+queryView = hookable(queryView)
 
 def getDefaultViewName(object, request, context=None):
     if context is None:


=== Zope3/src/zope/component/interfaces.py 1.13 => 1.13.4.1 ===
--- Zope3/src/zope/component/interfaces.py:1.13	Mon Aug 25 10:14:08 2003
+++ Zope3/src/zope/component/interfaces.py	Mon Sep  8 14:21:55 2003
@@ -295,8 +295,13 @@
 
 
     def getInterfaces():
-        """Return the interface(s) that objects created by this factory
-        will implement."""
+        """Get the interfaces implemented by the factory
+
+
+        Return the interface(s) that objects created by this factory
+        will implement.
+
+        """
 
 class IFactoryService(Interface):
 




More information about the Zope3-Checkins mailing list