443 ^ [] |
443 ^ [] |
444 |
444 |
445 "Created: 17.1.1997 / 21:08:22 / cg" |
445 "Created: 17.1.1997 / 21:08:22 / cg" |
446 ! |
446 ! |
447 |
447 |
|
448 actionFor:aKey withValue:aValue |
|
449 "return an action for aKey/value combonation. |
|
450 This is invoked during window building |
|
451 (by the builder) to ask for an ActionButtons actionBlock if that button |
|
452 specified an action with an argument value. |
|
453 Here, first the local bindings are searched, then the application and |
|
454 finally the applications class is asked for a corresponding action. |
|
455 The returned object is typically a block." |
|
456 |
|
457 |b| |
|
458 |
|
459 bindings notNil ifTrue:[ |
|
460 b := bindings at:aKey ifAbsent:nil. |
|
461 b notNil ifTrue:[^ b]. |
|
462 ]. |
|
463 |
|
464 application notNil ifTrue:[ |
|
465 Object messageNotUnderstoodSignal handle:[:ex | |
|
466 Transcript showCR:'not understood: ' , aKey. |
|
467 ] do:[ |
|
468 ^ application actionFor:aKey withValue:aValue |
|
469 ] |
|
470 ]. |
|
471 applicationClass notNil ifTrue:[ |
|
472 (applicationClass respondsTo:#actionFor:withValue:) ifTrue:[ |
|
473 ^ applicationClass actionFor:aKey withValue:aValue |
|
474 ] |
|
475 ]. |
|
476 ^ [:dummy | ] |
|
477 |
|
478 "Created: 17.1.1997 / 21:08:22 / cg" |
|
479 ! |
|
480 |
448 aspectFor:aKey |
481 aspectFor:aKey |
449 "return a model for aKey. This is invoked during window building |
482 "return a model for aKey. This is invoked during window building |
450 (by the builder) to ask for an Editfields, a Toggles etc. model. |
483 (by the builder) to ask for an Editfields, a Toggles etc. model. |
451 Here, first the local bindings are searched, then the application and |
484 Here, first the local bindings are searched, then the application and |
452 finally the applications class is asked for a corresponding action. |
485 finally the applications class is asked for a corresponding action. |