[Zope3-checkins] CVS: Zope3/src/zope/app/component - metadirectives.py:1.4.2.1

Philipp von Weitershausen philikon at philikon.de
Wed Aug 6 11:25:27 EDT 2003


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

Modified Files:
      Tag: zcml-interface-field-branch
	metadirectives.py 
Log Message:
Change GlobalObject to InterfaceField wherever applicable.


=== Zope3/src/zope/app/component/metadirectives.py 1.4 => 1.4.2.1 ===
--- Zope3/src/zope/app/component/metadirectives.py:1.4	Sun Aug  3 13:50:11 2003
+++ Zope3/src/zope/app/component/metadirectives.py	Wed Aug  6 10:24:53 2003
@@ -20,6 +20,8 @@
      PythonIdentifier, MessageID
 from zope.schema import Text, TextLine, Id
 
+from zope.app.configuration import InterfaceField
+
 class IBasicComponentInformation(Interface):
 
     component = GlobalObject(
@@ -42,7 +44,7 @@
     This is the basic information for all views.
     """
 
-    for_ = GlobalObject(
+    for_ = InterfaceField(
         title=u"The interface this view applies to.",
         description=u"""
         The view will be for all objects that implement this
@@ -83,7 +85,7 @@
         Multiple interfaces can be provided, separated by
         whitespace.""",
         required=False,
-        value_type=GlobalObject()
+        value_type=InterfaceField()
         )
 
     allowed_attributes = Tokens(
@@ -118,7 +120,7 @@
     Define an interface
     """
     
-    interface = GlobalObject(
+    interface = InterfaceField(
         title=u"Interface",
         required=True
         )
@@ -134,12 +136,12 @@
         value_type=GlobalObject()
         )
 
-    provides = GlobalObject(
+    provides = InterfaceField(
         title=u"Interface the component provides",
         required=True
         )
 
-    for_ = GlobalObject(
+    for_ = InterfaceField(
         title=u"Interface the component is used for",
         required=True
         )
@@ -159,7 +161,7 @@
     Register a utility
     """
 
-    provides = GlobalObject(
+    provides = InterfaceField(
         title=u"Interface the component provides",
         required=True
         )
@@ -213,7 +215,7 @@
     allowed_interface = Tokens(
         title=u"Interface that is also allowed if user has permission.",
         required=False,
-        value_type=GlobalObject()
+        value_type=InterfaceField()
         )
 
     allowed_attributes = Tokens(
@@ -240,6 +242,8 @@
         required=True
         )
 
+    # we can't use InterfaceField here because it depends on the
+    # interface service which we want to set up with this!
     interface = GlobalObject(
         title=u"Interface of the service type",
         required=True
@@ -274,7 +278,7 @@
     interface = Tokens(
         title=u"One or more interfaces",
         required=True,
-        value_type=GlobalObject()
+        value_type=InterfaceField()
         )
 
 class IRequireSubdirective(Interface):
@@ -303,13 +307,13 @@
     interface = Tokens(
         title=u"Interface",
         required=False,
-        value_type=GlobalObject()
+        value_type=InterfaceField()
         )
 
     set_schema = Tokens(
         title=u"The attributes specified by the schema can be set",
         required=False,
-        value_type=GlobalObject()
+        value_type=InterfaceField()
         )
 
     like_class = GlobalObject(
@@ -333,7 +337,7 @@
     interface = Tokens(
         title=u"Interface",
         required=False,
-        value_type=GlobalObject()
+        value_type=InterfaceField()
         )
 
 class IFactorySubdirective(Interface):




More information about the Zope3-Checkins mailing list