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

Steve Alexander steve@cat-box.net
Mon, 6 Jan 2003 13:40:08 -0500


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

Modified Files:
	interfacefield.py 
Log Message:
Gave the interface and interfaces fields a basetype that can be None.
Made widgets display the interface name "Anything" for the catch-all
interface None.
Updated adapter and view configuration schemas to use None as the 
basetype for for_interface


=== Zope3/src/zope/app/interfaces/component/interfacefield.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/interfaces/component/interfacefield.py:1.3	Mon Dec 30 13:43:07 2002
+++ Zope3/src/zope/app/interfaces/component/interfacefield.py	Mon Jan  6 13:39:36 2003
@@ -23,16 +23,18 @@
 class IInterfaceField(IValueSet):
     u"""A type of Field that has an Interfaces as its value."""
 
-    type = Field(title=u"Base type",
-                 description=u"All values must extend (or be) this type",
+    basetype = Field(title=u"Base type",
+                 description=u"All values must extend (or be) this type,"
+                              " unless it is None which means 'anything'.",
                  default=Interface,
                  )
 
 class IInterfacesField(ITuple):
     u"""A type of Field that is has a tuple of Interfaces as its value."""
 
-    value_types = Field(
+    basetype = Field(
             title=u"Base type",
-            description=u"All values must extend or be these types",
-            default=(Interface,),
+            description=u"All values must extend or be this type,"
+                         " unless it is None, which means 'anything'.",
+            default=Interface,
             )