Weird behavior of Roassal2 Graph

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Weird behavior of Roassal2 Graph

Tommaso DS
Hello,

I am a bit puzzled by the behavior of Roassal2 using RTGraphBuilder.
Inspired by the Agile Visualization Book, I tried some scripts, but I
ran into some problems regarding edges.

I used this simple script to connect some random dots:

nodes := #(one two three four five).
b := RTGraphBuilder new.

b edges
     color: Color red;
     connectFrom: [ :e | nodes atRandom ].

b nodes color: Color gray.
b layout grid.

b addAll: nodes.
b


It worked to draw the dots, but it didn't displayed any edge. The weird
thing is that if I put integers or characters inside nodes, it works
correctly.

Example -- this works:

nodes := #(1 2 3 4 5 6).
b := RTGraphBuilder new.

b edges
     color: Color red;
     connectFrom: [ :e | nodes atRandom ].

b nodes color: Color gray.
b layout grid.

b addAll: nodes.
b


Am I doing something wrong?

Thanks,
Tommaso
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Weird behavior of Roassal2 Graph

abergel
Hi Tommaso!

Well spotted!
connectFrom: and connectTo: may return a simple object or a collection. This is handy to not have a method called connectFromAll: and connectToAll: (as we have in Mondrian).
But String and Symbol are considered as collections.

Update Roassal2 and you will have the correct behavior

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



> On Oct 30, 2014, at 1:51 PM, Tommaso Dal Sasso <[hidden email]> wrote:
>
> Hello,
>
> I am a bit puzzled by the behavior of Roassal2 using RTGraphBuilder.
> Inspired by the Agile Visualization Book, I tried some scripts, but I ran into some problems regarding edges.
>
> I used this simple script to connect some random dots:
>
> nodes := #(one two three four five).
> b := RTGraphBuilder new.
>
> b edges
>    color: Color red;
>    connectFrom: [ :e | nodes atRandom ].
>
> b nodes color: Color gray.
> b layout grid.
>
> b addAll: nodes.
> b
>
>
> It worked to draw the dots, but it didn't displayed any edge. The weird thing is that if I put integers or characters inside nodes, it works correctly.
>
> Example -- this works:
>
> nodes := #(1 2 3 4 5 6).
> b := RTGraphBuilder new.
>
> b edges
>    color: Color red;
>    connectFrom: [ :e | nodes atRandom ].
>
> b nodes color: Color gray.
> b layout grid.
>
> b addAll: nodes.
> b
>
>
> Am I doing something wrong?
>
> Thanks,
> Tommaso
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Weird behavior of Roassal2 Graph

Tommaso DS
Amazing, it works perfectly ;-)

Thanks a lot for the super-fast fix!
Tommaso


On 30/10/14 20:40, Alexandre Bergel wrote:

> Hi Tommaso!
>
> Well spotted!
> connectFrom: and connectTo: may return a simple object or a collection. This is handy to not have a method called connectFromAll: and connectToAll: (as we have in Mondrian).
> But String and Symbol are considered as collections.
>
> Update Roassal2 and you will have the correct behavior
>
> Cheers,
> Alexandre

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev