Hi,
You should tell the presentation to explicitly "validate" the ports after an
update. This does not happen by default because it can be computationally expensive.
I added an example in the latest Glamour-Examples:
GLMBasicExamples>>validatingPresentation
Cheers,
Doru
On 14 Sep 2011, at 20:47, Esteban Lorenzano wrote:
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
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"Sometimes the best solution is not the best solution."