Hi Cesar,
Welcome in Moose-land :)
The problem in your script is that you are sending andShow: with your transmissions as well.
For the record, the semantics of andShow: are: - delete the existing presentations - delete the value of all ports - install the new value in the port - install the new presentations
Try this: browser := GLMTabulator new. browser column: #one; column: #two. browser transmit to: #one; andShow: [ :a | a mondrian painting: [:view :list | view shape label text: #asString. view nodes: list. view verticalLineLayout ]]. browser transmit to: #two; andShow: [ :a | a mondrian painting: [:view :list | view shape label text: #asString. view nodes: list. view verticalLineLayout ]]. browser transmit from: #one; to: #two port: #selection. browser transmit from: #two; to: #one port: #selection. browser openOn: (1 to: 42)
Note that there is no andShow: related to the last two transmissions. Only the values get moved.
Does this work for you?
Cheers, Doru
On Thu, Jan 5, 2012 at 2:50 PM, Cesar Couto cesarfmc@gmail.com wrote:
My name is Cesar Couto and I am working with Nicolas Anquetil at INRIA.
I think this code just works with list, but it does not work mondrian painting. Look this simple code using mondrian:
|browser| browser := GLMTabulator new. browser column: #one; column: #two.
browser transmit to: #one; andShow: [ :a | a mondrian painting: [ :view :bug | view shape label. view node: 'one'. view shape rectangle. view node:1 ] ].
browser transmit to: #two; andShow: [ :a | a mondrian painting: [ :view :bug | view shape label. view node: 'two'. view shape rectangle. view node:2 ] ]. browser transmit from: #one; to: #two port: #selection; andShow: [ :a | a mondrian title: [ :entity | 'one clicked']; painting: [ :view :class | view shape label. view node: 'one clicked'. view shape rectangle. view node:3 ]].
browser transmit from: #two; to: #one port: #selection; andShow: [ :a | a mondrian title: [ :entity | 'two clicked']; painting: [ :view :bug | view shape label. view node: 'two clicked'. view shape rectangle. view node:4]]. browser openOn: MooseModel root allModels first.
Both of the panes open correctly. But when I click on the entities in one pane, the other pane turn gray and nothing happens.
What do you think?
Cesar Couto
-- http://www.decom.cefetmg.br/cesar
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev