Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refresh a GLMRoassalPresentation #808

Closed
seandenigris opened this issue Aug 3, 2015 · 3 comments
Closed

refresh a GLMRoassalPresentation #808

seandenigris opened this issue Aug 3, 2015 · 3 comments

Comments

@seandenigris
Copy link
Contributor

Originally reported on Google Code with ID 808

the update function on GLMRoassalPresentation don't call the painting block. Consequently
the visualization is not refreshed. 

Reported by guillaume.larcheveque on 2012-06-29 14:46:50

@seandenigris
Copy link
Contributor Author

Hello,

I am trying to add an update event in GLMMorphicRoassalRenderer so that when the pane
containing the roassal visualization is sent an update event, the corresponding roassal
visualization is redrawn (please see: http://code.google.com/p/moose-technology/issues/detail?id=808).

Now, I can trigger painting block of the GLMRoassalPresentation but there are some
missing entities and the layout not being applied properly.Please find attached to
this mail my code for GLMMorphicRoassalRenderer class to trigger the update event.
Can you please see what is missing in my code that does not allow proper rendering
of roassal visualization?

You can use this code to test the updated rendering feature:

    | browser startNumber |
    browser := GLMTabulator withStatusbar.
    startNumber := 1.
    browser column: #one.
    browser transmit to: #one; andShow: [ :a |
        a roassal 
            title: 'Numbers in Roassal';
            painting: [:view :number |
                view shape label.
                view interaction 
                    on: ROMouseClick do:  [ :event |  
                        ROFocusView new on: event element view: view raw ].
                view nodes: (startNumber to: number).
                view edgesFrom: [:each | each // 5 ].
                self halt.
                view treeLayout.
                view addMenu: 'Refresh' callBack: [ :stack | startNumber := 10. (browser paneNamed:
#one) update ].
                  ]].
        browser openOn: 42

tx,
Usman

Reported by usman.bhatti on 2012-07-04 19:46:16


- _Attachment: [GLMMorphicRoassalRenderer.st](https://storage.googleapis.com/google-code-attachments/moose-technology/issue-808/comment-1/GLMMorphicRoassalRenderer.st)_

@seandenigris
Copy link
Contributor Author

Hi Guillaume and Usman, 

The solution for that problem is easy. Check this:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    | browser |
    browser := GLMTabulator withStatusbar.

    browser column: #one.
    browser transmit to: #one; andShow: [ :a |
        a roassal 
            title: 'Numbers in Roassal';
            painting: [:view :number |
                | b |
                b := [ :startNumber | 
                    view shape label.
                    view interaction 
                        on: ROMouseClick do:  [ :event |  
                            ROFocusView new on: event element view: view raw ].
                    view nodes: (startNumber to: number).
                    view edgesFrom: [:each | each // 5 ].
                    view treeLayout.
                    view applyLayout ].

                "Initial view"
                b value: 1.


                view addMenu: 'Refresh' callBack: [ :stack | 
                    "We need to clean the view first, else all the nodes get accumulated"
                    view raw elementsDo: #remove.

                    b value: 3 . 
                    (browser paneNamed: #one) update ].
                  ]].
        browser openOn: 42
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

I am not sure this is a problem of Glamour. I feel Roassal is missing the abstraction.
The main problem is the following: you are using the Mondrian DSL to build your view.
However, Mondrian never supported any repaint functionalities. So, trying to do a repaint
in Mondrian is not nice.

Maybe a new DSL is needed for this. 

Is the problem fixed?

Cheers,
Alexandre

Reported by alexandre.bergel on 2012-07-05 10:33:21

@seandenigris
Copy link
Contributor Author

Thanks, Usman for the fix. I added a test and integrated it. I also updated slightly
Roassal to expose the view from the Morph.

Reported by tudor.girba on 2012-07-25 05:32:16

  • Status changed: Fixed
  • Labels added: Milestone-4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant