[Checkins] SVN: grok/trunk/doc/reference/components.rst fix example which was incorrectly looking up the multiadapter

Kevin Teague kevin at bud.ca
Thu Mar 5 16:43:30 EST 2009


Log message for revision 97551:
  fix example which was incorrectly looking up the multiadapter

Changed:
  U   grok/trunk/doc/reference/components.rst

-=-
Modified: grok/trunk/doc/reference/components.rst
===================================================================
--- grok/trunk/doc/reference/components.rst	2009-03-05 21:06:25 UTC (rev 97550)
+++ grok/trunk/doc/reference/components.rst	2009-03-05 21:43:30 UTC (rev 97551)
@@ -476,7 +476,8 @@
 .. code-block:: python
 
     import grok
-    from zope import interface
+    import zope.component
+    import zope.interface
 
     class Fireplace(grok.Model):
        pass
@@ -484,7 +485,7 @@
     class Cave(grok.Model):
        pass
 
-    class IHome(interface.Interface):
+    class IHome(zope.interface.Interface):
        pass
 
     class Home(grok.MultiAdapter):
@@ -495,7 +496,7 @@
            self.cave = cave
            self.fireplace = fireplace
 
-    home = IHome(cave, fireplace)
+    home = zope.component.getMultiAdapter((cave, fireplace), IHome)
 
 :class:`grok.Annotation`
 ========================



More information about the Checkins mailing list