[Zope3-checkins] CVS: Zope3/src/zope/app/component - interfacefield.py:1.4

Steve Alexander steve@cat-box.net
Sun, 5 Jan 2003 13:57:21 -0500


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

Modified Files:
	interfacefield.py 
Log Message:
Added a widget for choosing a tuple of interfaces, and displaying them.


=== Zope3/src/zope/app/component/interfacefield.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/component/interfacefield.py:1.3	Mon Dec 30 13:43:05 2002
+++ Zope3/src/zope/app/component/interfacefield.py	Sun Jan  5 13:56:47 2003
@@ -48,15 +48,14 @@
 
     value_type = Interface
 
-    def __init__(self, value_type=Interface, *args, **kw):
-        super(InterfacesField, self).__init__(*args, **kw)
+    def __init__(self, value_type=Interface, default=(), *args, **kw):
+        super(InterfacesField, self).__init__(default=default, *args, **kw)
         self.validate((value_type,))
         self.value_type = value_type
         # Not using schema.Sequence.value_types
 
     def _validate(self, value):
         super(InterfacesField, self)._validate(value)
-
         for item in value:
             if not IInterface.isImplementedBy(item):
                 raise ValidationError("Not an interface", item)