Hi,
On 7 Jan 2011, at 22:44, Esteban Lorenzano wrote:
Hi,
I wonder how can I enable/disable elements from toolbar, depending on selections in some
presentations.
You cannot.
I also wonder how can pass "arguments" to
elements in toolbar: for example, I need an element in toolbar to know the selection of
the list shown in the panel below.
Every action defined on a presentation receives that presentation as the first argument.
From the presentation, you can simply ask for the selection. For example:
... andShow: [:a |
a list
act: [:list | list selection inspect] ...
]
However, when working with Glamour, you should think in terms of actions and context. The
toolbar is used to define actions that are applicable to the entire presentation. If you
want to define an action to a selection only, you should use selectionAct:...
a list
selectionAct: [:list | list selection inspect] ...
Cheers,
Doru
Cheers,
Esteban
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"There are no old things, there are only old ways of looking at them."