ApplicationModel.st
changeset 2364 b6ba7b2b21be
parent 2355 ea393eb88f25
child 2365 4050feaebfc2
--- a/ApplicationModel.st	Tue Jan 08 12:52:49 2008 +0100
+++ b/ApplicationModel.st	Tue Jan 08 12:53:04 2008 +0100
@@ -935,6 +935,21 @@
      ^ masterApplication actionFor:aKey withValue:aValue
 !
 
+actionFor:aKey withValue:value1 withValue:value2
+    "sent by the builder to ask for an actionBlock for a Button which passes two values. 
+     The argument, aKey comes from an UI-spec for a buttons #action property.
+     Here, a corresponding message is sent to myself,
+     which ought to be defined in the application subclass.
+     Alternatively, a subclass may redefine this method, to provide
+     actionBlocks from a Dictionary or whatever.
+     Typically, a block is returned there."
+
+     (self selfResponsibleFor:aKey) ifTrue:[
+         ^ [self perform:aKey with:value1 with:value2]
+     ].
+     ^ masterApplication actionFor:aKey withValue:value1 withValue:value2
+!
+
 aspectFor:aKey
     "sent by the builder to ask for an aspect (a data model).
      The argument, aKey comes from an UI-spec
@@ -2952,7 +2967,7 @@
 !ApplicationModel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.237 2007-11-15 15:31:02 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.238 2008-01-08 11:53:04 cg Exp $'
 ! !
 
 ApplicationModel initialize!