[Zope3-checkins] CVS: Zope3/src/zope/app/form - utility.py:1.26

Jim Fulton jim at zope.com
Fri Mar 5 17:10:14 EST 2004


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

Modified Files:
	utility.py 
Log Message:
Renamed interface methods:

isImplementedByInstancesOf to implementedBy
  isImplementedBy            to providedBy


=== Zope3/src/zope/app/form/utility.py 1.25 => 1.26 ===
--- Zope3/src/zope/app/form/utility.py:1.25	Fri Jan 23 12:00:20 2004
+++ Zope3/src/zope/app/form/utility.py	Fri Mar  5 17:09:06 2004
@@ -108,14 +108,14 @@
     if widget is None:
         widget = getattr(view, name, None)
         if widget is not None:
-            if IViewFactory.isImplementedBy(widget):
+            if IViewFactory.providedBy(widget):
                 # Old custom widget definition.
                 # We'll accept it, but we'll whine
                 _whine(view, name)
 
                 # we also need to remember to install the widget
                 installold = True
-            elif IWidget.isImplementedBy(widget):
+            elif IWidget.providedBy(widget):
                 # Old widget definition. We'll accept it, but we'll whine
                 _whine(view, name)
             else:
@@ -138,18 +138,18 @@
 
     else:
         # We have an attribute of the right name, is it really a widget
-        if IViewFactory.isImplementedBy(widget):
+        if IViewFactory.providedBy(widget):
             # This is a view factory, probably a custom widget.
             # Try to make it into a widget.
             field = field.bind(context)
             widget = widget(field, view.request)
-            if IWidget.isImplementedBy(widget):
+            if IWidget.providedBy(widget):
                 # Yee ha! We have a widget now, save it
                 setattr(view, wname, widget)
                 if installold or not hasattr(view, name):
                     setattr(view, name, WhiningWidget(view, name, widget))
 
-        if not IWidget.isImplementedBy(widget):
+        if not IWidget.providedBy(widget):
             raise TypeError(
                 "The %s view attribute named, %s, should be a widget, "
                 "but isn't."




More information about the Zope3-Checkins mailing list