for instance, this:
browser transmit to: #detail; from: #list; andShow: [ :presenter | presenter morph title: [ :anItem | anItem asString ]; act: [ :presentation :anItem | self removeItem: anItem ] icon: LWUIIcons / #delete entitled: 'Borrar'; display: [ :anItem | (self magritteDescription asMorphOn: anItem) addButtons: #(save); onAnswer: [ :value | self updateItem: value ]; morph ] ].
...does exactly what I need... so... I don't need to use the magritte presentation at all... I know. But... it shouldn't have an option to do this? otherwise, I think is not useful at all, for certain scenaries (and we should stuck with morph presentation) :(
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