Status: New Owner: alexandr...@gmail.com Labels: Type-Defect Priority-Medium Component-Roassal
New issue 808 by guillaum...@gmail.com: refresh a GLMRoassalPresentation http://code.google.com/p/moose-technology/issues/detail?id=808
the update function on GLMRoassalPresentation don't call the painting block. Consequently the visualization is not refreshed.
Comment #1 on issue 808 by usman.bh...@gmail.com: refresh a GLMRoassalPresentation http://code.google.com/p/moose-technology/issues/detail?id=808
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
Attachments: GLMMorphicRoassalRenderer.st 852 bytes
Updates: Cc: tudor.gi...@gmail.com usman.bh...@gmail.com guillaum...@gmail.com
Comment #2 on issue 808 by alexandr...@gmail.com: refresh a GLMRoassalPresentation http://code.google.com/p/moose-technology/issues/detail?id=808
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
Updates: Status: Fixed Labels: Milestone-4.7
Comment #3 on issue 808 by tudor.gi...@gmail.com: refresh a GLMRoassalPresentation http://code.google.com/p/moose-technology/issues/detail?id=808
Thanks, Usman for the fix. I added a test and integrated it. I also updated slightly Roassal to expose the view from the Morph.