[kupfer: 32/53] obj: Improve Action.activate docstring



commit 9fb5f2141d5c13e95360bed2414cca7a2548e305
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Thu Mar 24 17:22:38 2011 +0100

    obj: Improve Action.activate docstring

 kupfer/obj/base.py |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/kupfer/obj/base.py b/kupfer/obj/base.py
index 4fd5da9..6526d2f 100644
--- a/kupfer/obj/base.py
+++ b/kupfer/obj/base.py
@@ -237,11 +237,19 @@ class Action (KupferObject):
 		"""by default, actions of one type are all the same"""
 		return ""
 
-	def activate(self, leaf, obj=None):
-		"""Use this action with @leaf and @obj
+	def activate(self, obj, iobj=None, ctx=None):
+		"""Use this action with @obj and @iobj
 
-		@leaf: the object (Leaf)
-		@obj: an indirect object (Leaf), if self.requires_object
+		@obj:  the direct object (Leaf)
+		@iobj: the indirect object (Leaf), if ``self.requires_object``
+			   returns ``False``
+
+		if ``self.wants_context`` returns ``True``, then the action
+		also receives an execution context object as ``ctx``.
+
+		Also, ``activate_multiple(self, objects, iobjects=None, ctx=None)``
+		is called if it is defined and the action gets either
+		multiple objects or iobjects.
 		"""
 		pass
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]