Hi Glamour experts,
There are methods in GLMPresentation like
�� #act:icon:entitled:
�� #act:icon:on:entitled:
adding an action but (unfortunately) these methods do not return the action itself but the presentation instead.
But the presentation itself is the receiver of the message so the sender already has access to
it anyway.
Not returning the created action makes it hard to access the action afterwards to send
additional messages to it (like #condition: or other).
One would have to implement a
��#act:icon:entitled:condition:
and other flavours - ending up in a lot of method variations.
Example: in CatalogBrowser>>defineAllRepositoriesInMCBrowserButton:
I have access to the list (a presentation) and I can use #act:icon:entitled: to add an action button
but have no access to the action added afterwards.
Should we change these methods to return the action and also GLMPresentation>>#addAction:
to return the action:
�� addAction: anAction
�� �� �� �� ^self actions addLast: anAction
This way it would be similar to a collection: if you add an element you get it in return.
IMHO this would prevent adding more and more "flavour" messages in the future. What do you
think.
Also: I would like the action buttons in CatalogBrowser to be only enabled when
�� �� �� an item in the list (presentation) is selected. How can I do that?
�� �� �� There is a #condition: for an action but that is the condition for the button
�� �� �� to be there. There is no updating #enabledWhen: or other.
Thanks
T.