Author: jmorliaguet
Date: Thu Nov  3 00:35:07 2005
New Revision: 28917

Modified:
   z3lab/cpsskins/branches/jmo-perspectives/controllers/__init__.py
   z3lab/cpsskins/branches/jmo-perspectives/controllers/configure.zcml
Log:

- docstring update for events



Modified: z3lab/cpsskins/branches/jmo-perspectives/controllers/__init__.py
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/controllers/__init__.py    
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/controllers/__init__.py    Thu Nov 
 3 00:35:07 2005
@@ -24,7 +24,15 @@
 from interfaces import IController
 
 class Controller(object):
-    """Event handler
+    """Base controller with a set of handlers for the most common events.
+
+    Element controllers are element adapters that provide IController.
+
+    When a monitored event occurs on an element, the event is dispatched
+    to the registered controller.
+
+    Controllers should subclass this base class since the list of events may
+    be extended in the future.
     """
     implements(IController)
 
@@ -35,24 +43,25 @@
         """What to do when an element has been created."""
 
     def added(self):
-        """What to do when an element has been added."""
+        """What to do when an element has been addedi to a container."""
 
     def removed(self):
-        """What to do when an element has been removed."""
+        """What to do when an element has been removed from a container."""
 
     def modified(self):
         """What to do when an element has been modified."""
 
-# Event handlers
+# Event handlers: events get dispatched to the controllers.
 
 def elementCreated(element, event):
-
+    """This suscriber is called when an element has been created.
+    """
     controller = IController(element, None)
     if controller is not None:
         controller.created()
 
 def elementAdded(element, event):
-    """This suscriber is called when an element has been added.
+    """This suscriber is called when an element has been added to a container.
     """
     # register the element
     getThemeManager().registerElement(element)
@@ -66,7 +75,8 @@
     dispatchToSublocations(element, event)
 
 def elementRemoved(element, event):
-    """This suscriber is called when an element has been removed.
+    """This suscriber is called when an element has been removed from a
+    container.
     """
     tmutil = getThemeManager()
     # the element may be removed from a folder above the theme manager

Modified: z3lab/cpsskins/branches/jmo-perspectives/controllers/configure.zcml
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/controllers/configure.zcml 
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/controllers/configure.zcml Thu Nov 
 3 00:35:07 2005
@@ -1,7 +1,6 @@
 <configure
     xmlns="http://namespaces.zope.org/zope";>
 
-
   <!-- Event subscribers -->
 
   <subscriber
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to