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?
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: ?) - 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
-- Johan Fabry jfabry@dcc.uchile.cl - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile