-
Notifications
You must be signed in to change notification settings - Fork 34
Actions
Sean DeNigris edited this page Jan 28, 2018
·
4 revisions
Actions are "DoIt"-able descriptions. They can e.g. show up as buttons in Magritte forms.
The action itself can be any valuable (e.g. aBlock, aSelector)
descriptionClipBaseline
<magritteActionDescription>
MAActionDescription new
label: 'Copy Baseline Load Snippet'; "[1]"
action: [ Clipboard clipboardText: self baselineLoadSnippet ];
yourself
Magritte does not provide specific functionality to describe behavioral aspects, such as operations, their parameters and return values [17,9]. This is not nec- essary, as methods in Smalltalk are objects that can be described as any other object. Then using the reflective facilities it is possible to retrieve a list of invok- able method sends (first class method invocations) that are available on a par- ticular class. On request these methods can be invoked with arguments provided by end users. (1, pg 5)
- If
#action:
isaSelector
, you can usually omit the#label
and one will be generated therefrom. For other valuables, e.g. the block above, you will probably want to supply a label, since the source of the block does not make a great button label! - "Magritte – A Meta-Driven Approach to Empower Developers and End Users"