Hi Doru,

thanks for the reply, but unfortunately did not work. If you put the command halt:

|browser | 
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.
 self halt.
               view verticalLineLayout  ]].
browser transmit to: #two; andShow: [ :a |
       a mondrian painting: [:view :list |
               view shape label text: #asString.
               view nodes: list.
 self halt.
               view verticalLineLayout  ]].
browser transmit from: #one; to: #two port: #selection.
browser transmit from: #two; to: #one port: #selection.
browser openOn: (1 to: 42)

you will realize that the block is executed only once. I want the block is executed always there is a selection.

César Couto

On Thu, Jan 5, 2012 at 4:28 PM, Tudor Girba <tudor@tudorgirba.com> wrote:
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
>



--
www.tudorgirba.com

"Every thing has its own flow"

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



--
http://www.decom.cefetmg.br/cesar