yes... I also can use
presenter morph
instead
presenter magritte
but I think glamour deserves a better way, IMHO... as Doru said, this is a very common pattern, so it should be an easy way to perform it...
cheers, Esteban
El 15/09/2011, a las 11:12a.m., Johan Fabry escribió:
One trick that I do in AspectMaps to notify updates (going around glamour limitations) is to use announcements. For example I send an event whenever the underlying model has changed:
self announcer announce: (AMModelChanged new).
I force a refresh of the pane when this happens using the code below. You could do the same: send an event when the #save call is made ...
browser transmit to: #mpanel; from: ... ; andShow: [:a | a mondrian painting: [ ...]; updateOn: AMModelChanged from: [:ent | self announcer ]].
On 15 Sep 2011, at 09:54, Esteban Lorenzano wrote:
Hi, I'm making some progress here... but now I need another feature. As I'm using glamour and magritte to present some data who is persistent, I need to being able to react to a #save call on a magritte presentation. For instance... in my browser:
... browser transmit to: #detail; from: #list; andShow: [ :presenter | presenter magritte title: [ :anItem | anItem asString ]; act: [ :presentation :anItem | self removeItem: anItem ] icon: LWUIIcons / #userTrash entitled: 'Borrar' ]. ...
how can I know if user pressed #save and there is a modified object there? (to update persistent repository) working with plain magritte, I'd do:
... anObject asMorph onAnswer: [ :value | blah, blah ]; morph. ...
...so... is there a way in glamour to react to updated objects?
cheers, Esteban _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry jfabry@dcc.uchile.cl - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev