Skip to content
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)

Usage

descriptionClipBaseline
	<magritteActionDescription>
	MAActionDescription new
		label: 'Copy Baseline Load Snippet'; "[1]"
		action: [ Clipboard clipboardText: self baselineLoadSnippet ];
		yourself

Further Research

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)

  1. If #action: is aSelector, 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!
  2. "Magritte – A Meta-Driven Approach to Empower Developers and End Users"
Clone this wiki locally