Hi Johan,
Doru, thanks a lot for this clarification. I was able to significantly clean up the Glamour part of AspectMaps, squashing some nasty side-effects on the way! See below for more details ...
On 05 May 2010, at 15:53, Tudor Girba wrote:
It looks to me like the button actions are actually actions that should belong to the MondrianPresentation. Unfortunately, there is no support for rendering a menu on a presentation (although it would be great to have it), so perhaps a good place would be in a menu on a canvas.
Yes, agree that the buttons do things related to the mondrian presentation. However I dont like the idea of having these buttons as menu items because of ease of use. More clicks required to get to a menu item, plus the buttons are more visible. That's the 'raison d'etre' of toolbars, no?
Completely agree. There is no toolbar just because I do not know how to do it with Morphic. Ideally I would like to have a tab widget like the one in Eclipse with a small toolbar to the right of the tabs.
Regarding the triggering of transmissions from actions, the preferred way is to populate a port of the enclosing pane. For that you can directly use:
populate: #your_port on: $shortcut entitled: 'Title' with: [:presentation | ... ]
Take a look at GLMBasicExample>>updateAction.
OK. So what I am doing now for the #buttons pane is
(a actionList) title: 'Structural Zoom'; populate: #selection on: $3 entitled: 'Enabled Aspects' with: [:p :entity | <do the work required for the button and return a new object>] populate: #selection on: $4 entitled: 'Multiple Aspects' with: [:p :entity | <do the work required for the button and return a new object>] et cetera ...
- I have the shortcut as a nonsensical number ($1 to $6) because
command shortcuts on buttons dont seem to work :-( (So does it make sense to have populate:on:with: ?)
No much, but this method is offered by GLMPresentation. We should just add one without the on:
- I make sure to always return a new object so that the 'new
selection' gets sent to the outside
- the mondrian view has a from: #buttons and ignores the value
passed, I just use it to trigger the update
That is a good solution at this moment :)
Cheers, Doru
-- Johan Fabry jfabry@dcc.uchile.cl - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Be rather willing to give than demanding to get."