Hi,
I'm again working with glamour.
I have this browser:
buildBrowser
| browser |
browser := GLMTabulator new
column: #list;
column: #detail;
yourself.
browser transmit
to: #list;
andShow: [ :presenter |
presenter list
title: [ self crudClass description label ];
act: [ self addItem ]
icon: LWUIIcons / #listAdd
entitled: 'Agregar';
selectionAct:[ :presentation :anItem | self removeItem: anItem ]
icon: LWUIIcons / #userTrash
entitled: 'Borrar';
updateOn: LWUIItemRemoved from: [ self announcer ];
display: [ self itemsSortedIfNecessary ] ].
browser transmit
to: #detail;
from: #list;
andShow: [ :presenter |
presenter magritte
title: [ :anItem | anItem asString ];
updateOn: LWUIItemRemoved from: [ self announcer ];
act: [ :presentation :anItem | self removeItem: anItem ]
icon: LWUIIcons / #userTrash
entitled: 'Borrar' ].
^browser
(don't take into account the spanish words :) )
the idea is this: I'm making a simple CRUD for some classes... and this is the
problem:
1) when calling "removeItem", I update the list, and everything works fine...
but I removed an element from the list, so... selection shouldn't be valid anymore,
and the magritte presentation should be erased... and this does not happens.
2) I added the #updateOn:from: send to magritte presentation to see if something
happens... and no, it never receives the update :(
so... I think there is a need to fix both problems: list presentations should trigger
transmit update if selection no longer valid, and magritte presentation should react to
updates.
Is that ok?
cheers,
Esteban