Updates: Cc: -tudor.gi...@gmail.com tu...@tudorgirba.com
Comment #1 on issue 654 by tu...@tudorgirba.com: [Glamour] Undocumented differences between types of actions http://code.google.com/p/moose-technology/issues/detail?id=654
Thanks for looking into this. Indeed it would be great to document them.
I added the following explanations to the Moose book. Is it clearer now?
--- http://www.themoosebook.org/book/internals/glamour/actions
There are several kinds of actions supported by Glamour. First, there are actions that are supposed to work for the entire presentation, and actions that are meant to work only contextually when there is a selection. These are specified using the following messages:
- the act:* messages define actions for the entire presentation. These actions are typically rendered in the toolbar from the top-right of the presentation. - the selectionAct:* messages define actions that should be active only when there is a selection. These actions are typically mapped on the contextual menu. The above messages define static actions. That means that regardless of what the values of the ports are, these actions will always be available. However, at times, we can also decide to provide actions dynamically depending on the port values. This can be achieved through dynamicActions: and dynamicActionsOnSelection: messages. These messages receive a block that will be evaluated on the presentation and should return a list of GLMAction objects.
These messages are meant to be used as a last result because they work with the internals of Glamour.