Hello,
I just did my first specific visualization with the GT inspector and it is very cool / powerful. As I don't know Glamour, I read the Glamour chapter in the book 'Deep into Pharo' and I tried to use #act:entitled: to display a menu for a table visualization like: composite table title: 'foo'; display: [ self associations ]; column: 'Key' evaluated: #key; column: 'Value' evaluated: #value; act: [ self halt ] entitled: 'new menu entry'
I cannot display the menu. Do I miss something?
Another question: Is it possible to add a menu bar with buttons to such a visualization?
Thanks, Christophe.
Hi,
act:entitled: will produce a menu item on the top right of the table. Is it not there?
If you want the icons, you have to use act:icon:entitled:
Doru
On Tue, Nov 25, 2014 at 1:31 PM, Christophe Demarey < Christophe.Demarey@inria.fr> wrote:
Hello,
I just did my first specific visualization with the GT inspector and it is very cool / powerful. As I don't know Glamour, I read the Glamour chapter in the book 'Deep into Pharo' and I tried to use #act:entitled: to display a menu for a table visualization like: composite table title: 'foo'; display: [ self associations ]; column: 'Key' evaluated: #key; column: 'Value' evaluated: #value; act: [ self halt ] entitled: 'new menu entry'
I cannot display the menu. Do I miss something?
Another question: Is it possible to add a menu bar with buttons to such a visualization?
Thanks, Christophe. _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Le 25 nov. 2014 à 13:50, Tudor Girba a écrit :
Hi,
act:entitled: will produce a menu item on the top right of the table. Is it not there?
ok, it is there. I did not notice the ... on the top right corner. I was expected a contextual menu. Thanks. By the way, is there something available for contextual menus (ex: action on the selection)?
Another question: Is it possible to add a menu bar with buttons to such a visualization?
For this point, is it supported or not yet?
Regards, Christophe.
On Tue, Nov 25, 2014 at 2:48 PM, Christophe Demarey < Christophe.Demarey@inria.fr> wrote:
Le 25 nov. 2014 à 13:50, Tudor Girba a écrit :
Hi,
act:entitled: will produce a menu item on the top right of the table. Is it not there?
ok, it is there. I did not notice the ... on the top right corner. I was expected a contextual menu. Thanks. By the way, is there something available for contextual menus (ex: action on the selection)?
From Glamour examples (GLMBasicExamples):
| finder | finder := GLMFinder new variableSizePanes. finder show: [:a | a list title: 'List'; display: [:each | $a to: each]; dynamicActionsOnSelection: [:list | {(GLMGenericAction new) "add contextual actions" action: [:each | self inform: 'Menu - Item', list selection printString]; title: 'Menu - Item ', list selection printString; yourself}]; act:#inspect icon: (Smalltalk ui icons iconNamed: #removeIcon) entitled:'my button' ]. "button for presentation" finder openOn: $z
You get a contextual menu on the list and button on the presentation. Hope it helps.
Another question: Is it possible to add a menu bar with buttons to such a visualization?
For this point, is it supported or not yet?
Regards, Christophe.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi,
Le 25 nov. 2014 à 18:14, Usman Bhatti a écrit :
On Tue, Nov 25, 2014 at 2:48 PM, Christophe Demarey Christophe.Demarey@inria.fr wrote:
Le 25 nov. 2014 à 13:50, Tudor Girba a écrit :
Hi,
act:entitled: will produce a menu item on the top right of the table. Is it not there?
ok, it is there. I did not notice the ... on the top right corner. I was expected a contextual menu. Thanks. By the way, is there something available for contextual menus (ex: action on the selection)?
From Glamour examples (GLMBasicExamples):
| finder | finder := GLMFinder new variableSizePanes. finder show: [:a | a list title: 'List'; display: [:each | $a to: each]; dynamicActionsOnSelection: [:list | {(GLMGenericAction new) "add contextual actions" action: [:each | self inform: 'Menu - Item', list selection printString]; title: 'Menu - Item ', list selection printString; yourself}]; act:#inspect icon: (Smalltalk ui icons iconNamed: #removeIcon) entitled:'my button' ]. "button for presentation" finder openOn: $z
You get a contextual menu on the list and button on the presentation. Hope it helps.
Yes, thanks a lot.
Christophe.