Author: jmorliaguet
Date: Tue Apr 11 20:25:14 2006
New Revision: 2820

Modified:
   cpsskins/branches/jmo-perspectives/elements/element.py
   cpsskins/branches/jmo-perspectives/elements/interfaces.py
   cpsskins/branches/jmo-perspectives/interfaces.py
   cpsskins/branches/jmo-perspectives/standard/ds/configure.zcml
   cpsskins/branches/jmo-perspectives/standard/ds/image.py
   cpsskins/branches/jmo-perspectives/standard/ds/item.py
   cpsskins/branches/jmo-perspectives/standard/ds/items.py
   cpsskins/branches/jmo-perspectives/standard/ds/metadata.py
   cpsskins/branches/jmo-perspectives/tests/setup.py
Log:

- the interface implemented by data structures is enough for doing typing
  between data and widgets



Modified: cpsskins/branches/jmo-perspectives/elements/element.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/elements/element.py      (original)
+++ cpsskins/branches/jmo-perspectives/elements/element.py      Tue Apr 11 
20:25:14 2006
@@ -29,8 +29,7 @@
 
 from cpsskins.elements.interfaces import IElement, IElementType, IType, INode
 from cpsskins.elements.interfaces import IInnerNode, ILeaf, INodeTraverser
-from cpsskins.elements.interfaces import IIdentifiable
-from cpsskins.interfaces import ITypeable
+from cpsskins.elements.interfaces import IIdentifiable, ITypeable
 from cpsskins.relations.interfaces import IRelatable
 from cpsskins.setup.interfaces import IResourceType
 

Modified: cpsskins/branches/jmo-perspectives/elements/interfaces.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/elements/interfaces.py   (original)
+++ cpsskins/branches/jmo-perspectives/elements/interfaces.py   Tue Apr 11 
20:25:14 2006
@@ -59,6 +59,12 @@
     def getContentName():
         """ """
 
+class ITypeable(Interface):
+
+    def getType():
+        """Return the element's complete type as a tuple
+        """
+
 class INode(IElement):
     """A generic tree node"""
 

Modified: cpsskins/branches/jmo-perspectives/interfaces.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/interfaces.py    (original)
+++ cpsskins/branches/jmo-perspectives/interfaces.py    Tue Apr 11 20:25:14 2006
@@ -21,9 +21,3 @@
 
 from cpsskins.elements.interfaces import IElement, IPortlet, IDisplay, IFormat
 
-class ITypeable(Interface):
-
-    def getType():
-        """Return the element's complete type as a tuple
-        """
-

Modified: cpsskins/branches/jmo-perspectives/standard/ds/configure.zcml
==============================================================================
--- cpsskins/branches/jmo-perspectives/standard/ds/configure.zcml       
(original)
+++ cpsskins/branches/jmo-perspectives/standard/ds/configure.zcml       Tue Apr 
11 20:25:14 2006
@@ -12,10 +12,6 @@
 
   </class>
 
-  <adapter
-      factory=".metadata.Typeable"
-  />
-
   <class class=".item.Item">
 
     <require
@@ -25,10 +21,6 @@
 
   </class>
 
-  <adapter
-      factory=".item.Typeable"
-  />
-
   <class class=".items.Items">
 
     <require
@@ -38,10 +30,6 @@
 
   </class>
 
-  <adapter
-      factory=".items.Typeable"
-  />
-
   <class class=".image.Image">
 
     <require
@@ -51,8 +39,4 @@
 
   </class>
 
-  <adapter
-      factory=".image.Typeable"
-  />
-
 </configure>

Modified: cpsskins/branches/jmo-perspectives/standard/ds/image.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/standard/ds/image.py     (original)
+++ cpsskins/branches/jmo-perspectives/standard/ds/image.py     Tue Apr 11 
20:25:14 2006
@@ -19,13 +19,10 @@
 
 from pprint import pprint
 
-from zope.component import adapts
 from zope.interface import implements, Interface
 from zope.i18nmessageid import MessageFactory
 from zope.schema import TextLine
 
-from cpsskins.interfaces import ITypeable
-
 _ = MessageFactory("cpsskins")
 
 class IImage(Interface):
@@ -88,11 +85,3 @@
     def __getitem__(self, key):
         return getattr(self, key)
 
-
-class Typeable(object):
-
-    adapts(IImage)
-    implements(ITypeable)
-
-    def getType(self):
-        return (IImage,)

Modified: cpsskins/branches/jmo-perspectives/standard/ds/item.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/standard/ds/item.py      (original)
+++ cpsskins/branches/jmo-perspectives/standard/ds/item.py      Tue Apr 11 
20:25:14 2006
@@ -19,13 +19,10 @@
 
 from pprint import pprint
 
-from zope.component import adapts
 from zope.interface import implements, Interface
 from zope.i18nmessageid import MessageFactory
 from zope.schema import TextLine, Bool
 
-from cpsskins.interfaces import ITypeable
-
 _ = MessageFactory("cpsskins")
 
 class IItem(Interface):
@@ -117,10 +114,3 @@
         return getattr(self, key)
 
 
-class Typeable(object):
-
-    adapts(IItem)
-    implements(ITypeable)
-
-    def getType(self):
-        return (IItem,)

Modified: cpsskins/branches/jmo-perspectives/standard/ds/items.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/standard/ds/items.py     (original)
+++ cpsskins/branches/jmo-perspectives/standard/ds/items.py     Tue Apr 11 
20:25:14 2006
@@ -19,13 +19,10 @@
 
 from pprint import pprint
 
-from zope.component import adapts
 from zope.interface import implements, Interface
 from zope.i18nmessageid import MessageFactory
 from zope.configuration.fields import Tokens
 
-from cpsskins.interfaces import ITypeable
-
 _ = MessageFactory("cpsskins")
 
 class IItems(Interface):
@@ -66,11 +63,3 @@
     def __iter__(self):
         return iter(self.items)
 
-
-class Typeable(object):
-
-    adapts(IItems)
-    implements(ITypeable)
-
-    def getType(self):
-        return (IItems,)

Modified: cpsskins/branches/jmo-perspectives/standard/ds/metadata.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/standard/ds/metadata.py  (original)
+++ cpsskins/branches/jmo-perspectives/standard/ds/metadata.py  Tue Apr 11 
20:25:14 2006
@@ -19,13 +19,10 @@
 
 from pprint import pprint
 
-from zope.component import adapts
 from zope.interface import implements, Interface
 from zope.i18nmessageid import MessageFactory
 from zope.schema import TextLine
 
-from cpsskins.interfaces import ITypeable
-
 _ = MessageFactory("cpsskins")
 
 class IMetaData(Interface):
@@ -74,11 +71,3 @@
     def __getitem__(self, key):
         return getattr(self, key)
 
-
-class Typeable(object):
-
-    adapts(IMetaData)
-    implements(ITypeable)
-
-    def getType(self):
-        return (IMetaData,)

Modified: cpsskins/branches/jmo-perspectives/tests/setup.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/tests/setup.py   (original)
+++ cpsskins/branches/jmo-perspectives/tests/setup.py   Tue Apr 11 20:25:14 2006
@@ -28,8 +28,7 @@
 from cpsskins.elements.display import Displayable
 from cpsskins.elements.format import Formattable
 from cpsskins.elements.interfaces import IElement, IDisplay
-from cpsskins.elements.interfaces import IIdentifiable
-from cpsskins.interfaces import ITypeable
+from cpsskins.elements.interfaces import IIdentifiable, ITypeable
 from cpsskins.perspectives import perspective
 from cpsskins.perspectives.interfaces import IPerspective
 from cpsskins.relations.interfaces import IRelationTool, IRelationStorage
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to