Tudor Girba wrote:
There was no reply, but there will be one now :)

Your solution should work, but it is sub-optimal and it is a
conceptual hack because you are refreshing the entire browser in order
for the contents of the Magritte presentation to refresh. You could
probably still just update the Magritte presentation, but this
behavior should be provided directly by the logic of the presentation.

Could you give it a try to add this code in the renderer?

Cheers,
Doru
  
GLMBasicExamples>>magritte requires not only the update of the Magritte presentation in the right-hand-pane.  The List in the left-hand-pane also needs to update when the associated value is modified in the Magritte pane.  For a more optimal solution I am assuming I need to understand "outer" ports or Announcements better  - but I'm not there yet.    I'd love to do more but (common complaint) it is a distraction from what I am trying to do for my masters project and time for that is running out.  I'd love it if someone could demonstrate the preferred way by modifying the example, so that I can do it right in my project, but the "whole-browser" hack will do, for me, for now.

I did get it working for the Magritte-pane-only using 'self update' in GLMMagrittePresentation>>reactOnAnswerFor:
which I have now uploaded as Glamour-Magritte-Presentations-BenComan.3

cheers, Ben
On Thu, Mar 8, 2012 at 1:09 PM, Ben Coman <btc@openinworld.com> wrote:
  
I've had some trouble with email.  I'm not sure if this one made it out or
if I just didn't get it back from the list. I would have missed any
responses.


Ben Coman wrote:
8<----cut-------
    
So in the end I added 'self update' to the start of
GLMMagrittePresentation>>reactOnAnswerFor:  as follows...
reactOnAnswerFor:  aValue
  self update.
  ^ answerBlock glamourValue:
      (aValue asGlamorousMultiValue,
      self asGlamorousMultiValue,
      self entity asGlamorousMultiValue)

and now the <cancel> button works as expected.  However I still don't know
what reactOnAnswerFor is meant to do, or if there
is a more appropriate way of achieving this.  Please let me know.

I also haven't had any success getting the #list pane to refresh when a
change is saved on the #detail pane.  Any assistance will be greatly
appreciated.

cheers, -ben

      
Phew! That was a lot to take in.   Upon further investigation I retract
modifying GLMMagrittePresentation.
The solution to both the <save> and <cancel> buttons can be encompassed
entirely within the user code with one additional line 'onAnswer:'

 magritteParentPrototype := a magritte.
     magritteParentPrototype     "these are the essential parts"
         title: 'Details';
         description: [:person | person magritteDescription] ;
         onAnswer: [ :ignore | browser update ] .

I have uploaded this as Glamour-Examples-BenComan.230

Note that I think this only worked for me last time when I had MagritteMagic
loaded onto Moose 4.6.

cheers, Ben

_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev