Hi,

yes, it is better, but it does not work intuitively. Try the following: 

1. execute your script,
2. click on 4 (selection), 
3. click on 8 (selection),
4. click on 4 (deselection),
5. click on 4 (selection)

You can see that the third list still keeps the number 8. It is necessary to 
deselect 8 in order to see 4. 

This part explains to me how the transmit works:

```
tabulator transmit 
        from: #one; to: #three;
        from: #two; to: #three;
        transformed: [ :x :y | y ifNil: [ x ] ifNotNil: [ y ] ];
        andShow: [ :a | 
                a fastList display: [ :x | Array with: x ] ].
```

By using #transformed: I can decide what to use (#one or #two). It is nice 
feature!

I think what I need is having to possibility to change the third list also 
according to what list is active (#one or #two). 
In the first screenshot, the first list is active (blue border). In the second 
screenshot, the second list is active. 
So I would like to update the third list according to the active one. 
Is it possible?



Thanks!
Juraj

> On Apr 3, 2017, at 18:53, Andrei Chis <[email protected]> wrote:
> 
> Hi,
> 
> That's actually the default behavior, but I see there is also a bug.
> Normally if you want to allow deselection in a presentation you should use 
> allowDeselection. Just I see there is a bug in the fast table renderer 
> because if I add #allowDeselection to the first presentation when clicking 
> again on the selected element the selection port is not cleared. If you use 
> #list instead of #fastList it works.
> 
> I think you can get the desired behaviur using this code:
> 
> -----------------------------------------------------------------
> tabulator := GLMTabulator new.
> 
> tabulator column: #one; column: #two; column: #three.
> 
> tabulator transmit to: #one; andShow: [ :composite |
>       composite list 
>               allowDeselection;
>               display: [ :x | Array with: x ] ].
> tabulator transmit to: #two; andShow: [ :composite |
>       composite list
>               allowDeselection;
>               display: [ :x | Array with: 2 * x ] ].
> 
> tabulator transmit 
>       from: #one; to: #three;
>       from: #two; to: #three;
>       transformed: [ :x :y | y ifNil: [ x ] ifNotNil: [ y ] ];
>       andShow: [ :a | 
>               a fastList display: [ :x | Array with: x ] ].
> 
> tabulator openOn: 4.
> -----------------------------------------------------------------
> 
> 
> Cheers,
> Andrei
> 
> On Mon, Apr 3, 2017 at 9:35 PM, Juraj Kubelka <[email protected] 
> <mailto:[email protected]>> wrote:
> Hi!
> 
> If you create the following Glamour browser:
> 
> ```
> tabulator := GLMTabulator new.
> 
> tabulator column: #one; column: #two; column: #three.
> 
> tabulator transmit to: #one; andShow: [ :composite |
>       composite fastList display: [ :x | Array with: x ] ].
> tabulator transmit to: #two; andShow: [ :composite |
>       composite fastList display: [ :x | Array with: 2 * x ] ].
> 
> tabulator transmit from: #one; to: #three; andShow: [ :a | 
>       a fastList display: [ :x | Array with: x ] ].
> tabulator transmit from: #two; to: #three; andShow: [ :a | 
>       a fastList display: [ :x | Array with: x ] ].
> 
> tabulator openOn: 4.
> ```
> 
> You will get the following browser: 
> 
> <Screen Shot 2017-04-03 at 16.30.28.png>
> 
> if you then select 4, the third list appears. If you then select 8, the value 
> is changed:
> 
> <Screen Shot 2017-04-03 at 16.29.38.png>
> 
> But since then, the third list does not change. It stays with 8 value 
> forever. 
> 
> Do I miss something? Should I define it differently? 
> Or if it is a bug: Can you give me insights how to fix it?
> 
> Tested in the latest Pharo 6.
> 
> Thanks!
> Juraj
> 
> 

Reply via email to