Mondrian question

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

Mondrian question

Stéphane Ducasse
Hi guys


I would like to have an edge drawn from a package to the classes that use it.
I did but it does not work

        view interaction
                                whenEnteringUpdateNode: [:node |
                                        view edgesToAll:  #sureReferencingClasses.].



in


view shape rectangle.
view interaction menuMorphBlock: [ :element | element mooseMenuMorph ].

view nodes: model allPackages
                forEach: [:pack |
                        view shape rectangle
                                fillColor: Color orange;
                                height: 7;
                                width: 7.
                        view interaction menuMorphBlock: [ :element | element mooseMenuMorph ].
                view interaction
                                whenEnteringUpdateNode: [:node |
                                        view edgesToAll:  #sureReferencingClasses.].
                               
                        view nodes: pack classes.
                        view gridLayout gapSize: 2.
                       
                ].

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

Re: Mondrian question

Stéphane Ducasse
I tried

> view shape rectangle.
> view interaction menuMorphBlock: [ :element | element mooseMenuMorph ].
>
> view interaction
> whenEnteringUpdateNode: [:node |
> view edgesToAll:  #sureReferencingClasses.].
> view nodes: model allPackages
> forEach: [:pack |
> view shape rectangle
> fillColor: Color orange;
> height: 7;
> width: 7.
> view interaction menuMorphBlock: [ :element | element mooseMenuMorph ].
>
>
> view nodes: pack classes.
> view gridLayout gapSize: 2.
>
> ].
>
> view  gridLayout.



How can I get an edge between my nodes and a list of other nodes
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Mondrian question

abergel
In reply to this post by Stéphane Ducasse
Hi Stef,

I haven't looked closely at your example, but try the following and let me know whether this solves your problem or not:

view node: 'node' forIt: [
        view interaction
                                whenEnteringUpdateNode: [ :aValue |
                                        view edges: {aValue}  from: #yourself toAll: ((1 to: 9) copyWithout: aValue )  ].

        view shape rectangle size: 30.
        view nodes: (1 to: 9).
        view gridLayout gapSize: 10.
]

I added this example in the MOEasel.

Cheers,
Alexandre


On 14 Jun 2011, at 10:18, Stéphane Ducasse wrote:

> Hi guys
>
>
> I would like to have an edge drawn from a package to the classes that use it.
> I did but it does not work
>
> view interaction
> whenEnteringUpdateNode: [:node |
> view edgesToAll:  #sureReferencingClasses.].
>
>
>
> in
>
>
> view shape rectangle.
> view interaction menuMorphBlock: [ :element | element mooseMenuMorph ].
>
> view nodes: model allPackages
> forEach: [:pack |
> view shape rectangle
> fillColor: Color orange;
> height: 7;
> width: 7.
> view interaction menuMorphBlock: [ :element | element mooseMenuMorph ].
> view interaction
> whenEnteringUpdateNode: [:node |
> view edgesToAll:  #sureReferencingClasses.].
>
> view nodes: pack classes.
> view gridLayout gapSize: 2.
>
> ].
>
> view  gridLayout.
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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






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

Re: Mondrian question

Stéphane Ducasse

On Jun 14, 2011, at 6:19 PM, Alexandre Bergel wrote:

> Hi Stef,
>
> I haven't looked closely at your example, but try the following and let me know whether this solves your problem or not:
>
> view node: 'node' forIt: [
> view interaction
> whenEnteringUpdateNode: [ :aValue |
> view edges: {aValue}  from: #yourself toAll: ((1 to: 9) copyWithout: aValue )  ].
>
> view shape rectangle size: 30.
> view nodes: (1 to: 9).
> view gridLayout gapSize: 10.
> ]
>

It seems to work but I do not understand what the edges: is the node that is entered.
I could never succeed to find that. For me the API is bogus. I'm totally confused. Can you explain to me why the edges is the starting node?

Now when I do that the original shapes (squares inside squares) that I have turn into a single one and I do not understand why.


view shape rectangle.
view interaction menuMorphBlock: [ :element | element mooseMenuMorph ].
view interaction
                                whenEnteringUpdateNode: [:node |
                                        view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses.].
                               
view nodes: model allPackages
                forEach: [:pack |
                        view shape rectangle
                                fillColor: Color orange;
                                height: 7;
                                width: 7.
                        view interaction menuMorphBlock: [ :element | element mooseMenuMorph ].
                        view nodes: pack classes.
                        view gridLayout gapSize: 2.
                ].

view  gridLayout.

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

Re: Mondrian question

abergel
> It seems to work but I do not understand what the edges: is the node that is entered.

I see the problem you're facing. Indeed, the syntax of Mondrian is a bit unintuitive. I recently introduced edgesFromAssociations: that makes it simpler to define edges. Consider the script:
-=-=-=-=-=-=-=-=
view nodes: (1 to: 5).
view edgesFromAssociations: {1 -> 3 . 1 -> 5}
-=-=-=-=-=-=-=-=

> I could never succeed to find that. For me the API is bogus. I'm totally confused. Can you explain to me why the edges is the starting node?

The reason of "edges: nodes from: b1 to: b2" is to produce as much edges as there are nodes. For each node, an edge is created by evaluating b1 and b2 against the node.

> Now when I do that the original shapes (squares inside squares) that I have turn into a single one and I do not understand why.

The interaction in Mondrian works well, but I agree this is a bit rough to use. The following:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
view interaction
        whenEnteringUpdateNode: [:node |
                view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses.].
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
means that when you enter the node, you replace everything under the node with some edges. You therefore discard the classes in it.

I propose two versions of your code. A long (and ugly one), and a much nicer one, but which does a slightly different thing:

The script draw edges between a packages and classes.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
view interaction
        whenEnteringUpdateNode: [:node |
                view shape rectangle
                        fillColor: Color orange;
                        height: 7;
                        width: 7.
                view nodes: node classes.
                view gridLayout gapSize: 2.
                view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses ]
       
        whenLeavingUpdateNode:  [:node |
                view shape rectangle
                        fillColor: Color orange;
                        height: 7;
                        width: 7.
                view nodes: node classes.
                view gridLayout gapSize: 2 ]
               
        withLayoutUpdate: true.
                               
view nodes: model allPackages
                forEach: [:pack |
                        view shape rectangle
                                fillColor: Color orange;
                                height: 7;
                                width: 7.
                        view nodes: pack classes.
                        view gridLayout gapSize: 2.
                ].

view  gridLayout.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



This version draws edges between classes
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
view nodes: model allPackages
                forEach: [:pack |
                        view shape rectangle
                                fillColor: Color orange;
                                height: 7;
                                width: 7.
                        view interaction
                                whenEnteringUpdateNode: [:node |
                                        view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses ].
                        view nodes: pack classes.
                        view gridLayout gapSize: 2.
                ].

view  gridLayout.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





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

Re: Mondrian question

Stéphane Ducasse

On Jun 15, 2011, at 4:59 PM, Alexandre Bergel wrote:

>> It seems to work but I do not understand what the edges: is the node that is entered.
>
> I see the problem you're facing. Indeed, the syntax of Mondrian is a bit unintuitive.

Yes
may be having a pass on the renderer Api would be good

> I recently introduced edgesFromAssociations: that makes it simpler to define edges. Consider the script:
> -=-=-=-=-=-=-=-=
> view nodes: (1 to: 5).
> view edgesFromAssociations: {1 -> 3 . 1 -> 5}
> -=-=-=-=-=-=-=-=
>
>> I could never succeed to find that. For me the API is bogus. I'm totally confused. Can you explain to me why the edges is the starting node?
>
> The reason of "edges: nodes from: b1 to: b2" is to produce as much edges as there are nodes. For each node, an edge is created by evaluating b1 and b2 against the node.


what do you mean by
        "by evaluating b1 and b2 against the node"

>
>> Now when I do that the original shapes (squares inside squares) that I have turn into a single one and I do not understand why.
>
> The interaction in Mondrian works well, but I agree this is a bit rough to use. The following:
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> view interaction
> whenEnteringUpdateNode: [:node |
> view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses.].
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> means that when you enter the node, you replace everything under the node with some edges. You therefore discard the classes in it.

ah I could not get it then.
Indeed the api sucks then

> I propose two versions of your code. A long (and ugly one), and a much nicer one, but which does a slightly different thing:

thanks I will have a look.

>
> The script draw edges between a packages and classes.
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> view interaction
> whenEnteringUpdateNode: [:node |
> view shape rectangle
> fillColor: Color orange;
> height: 7;
> width: 7.
> view nodes: node classes.
> view gridLayout gapSize: 2.
> view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses ]
>
> whenLeavingUpdateNode:  [:node |
> view shape rectangle
> fillColor: Color orange;
> height: 7;
> width: 7.
> view nodes: node classes.
> view gridLayout gapSize: 2 ]
>
> withLayoutUpdate: true.
>
> view nodes: model allPackages
> forEach: [:pack |
> view shape rectangle
> fillColor: Color orange;
> height: 7;
> width: 7.
> view nodes: pack classes.
> view gridLayout gapSize: 2.
> ].
>
> view  gridLayout.
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
>
>
> This version draws edges between classes
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> view nodes: model allPackages
> forEach: [:pack |
> view shape rectangle
> fillColor: Color orange;
> height: 7;
> width: 7.
> view interaction
> whenEnteringUpdateNode: [:node |
> view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses ].
> view nodes: pack classes.
> view gridLayout gapSize: 2.
> ].
>
> view  gridLayout.
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> 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: Mondrian question

abergel
>> The reason of "edges: nodes from: b1 to: b2" is to produce as much edges as there are nodes. For each node, an edge is created by evaluating b1 and b2 against the node.
>
>
> what do you mean by
> "by evaluating b1 and b2 against the node"

The code:
        view edges: (1 to: 3) from: #yourself to: [ :v | v * v]
is equivalent to:
        view edgesFromAssociations: {1 -> 1 . 1 -> 4 . 1 -> 9}


Alexandre

>
>>
>>> Now when I do that the original shapes (squares inside squares) that I have turn into a single one and I do not understand why.
>>
>> The interaction in Mondrian works well, but I agree this is a bit rough to use. The following:
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> view interaction
>> whenEnteringUpdateNode: [:node |
>> view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses.].
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> means that when you enter the node, you replace everything under the node with some edges. You therefore discard the classes in it.
>
> ah I could not get it then.
> Indeed the api sucks then
>
>> I propose two versions of your code. A long (and ugly one), and a much nicer one, but which does a slightly different thing:
>
> thanks I will have a look.
>
>>
>> The script draw edges between a packages and classes.
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> view interaction
>> whenEnteringUpdateNode: [:node |
>> view shape rectangle
>> fillColor: Color orange;
>> height: 7;
>> width: 7.
>> view nodes: node classes.
>> view gridLayout gapSize: 2.
>> view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses ]
>>
>> whenLeavingUpdateNode:  [:node |
>> view shape rectangle
>> fillColor: Color orange;
>> height: 7;
>> width: 7.
>> view nodes: node classes.
>> view gridLayout gapSize: 2 ]
>>
>> withLayoutUpdate: true.
>>
>> view nodes: model allPackages
>> forEach: [:pack |
>> view shape rectangle
>> fillColor: Color orange;
>> height: 7;
>> width: 7.
>> view nodes: pack classes.
>> view gridLayout gapSize: 2.
>> ].
>>
>> view  gridLayout.
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>
>>
>>
>> This version draws edges between classes
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> view nodes: model allPackages
>> forEach: [:pack |
>> view shape rectangle
>> fillColor: Color orange;
>> height: 7;
>> width: 7.
>> view interaction
>> whenEnteringUpdateNode: [:node |
>> view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses ].
>> view nodes: pack classes.
>> view gridLayout gapSize: 2.
>> ].
>>
>> view  gridLayout.
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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

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





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

Re: Mondrian question

Tudor Girba-2
Stef,

view edges: collection from: block1 to: block2

tries to create a edge for "each" element in the "collection" between the nodes that have the following entities behind:
- block1 value: each
- block2 value: each

I say it tries because if the nodes are not found, the edge will not get created.

Cheers,
Doru



On 15 Jun 2011, at 20:40, Alexandre Bergel wrote:

>>> The reason of "edges: nodes from: b1 to: b2" is to produce as much edges as there are nodes. For each node, an edge is created by evaluating b1 and b2 against the node.
>>
>>
>> what do you mean by
>> "by evaluating b1 and b2 against the node"
>
> The code:
> view edges: (1 to: 3) from: #yourself to: [ :v | v * v]
> is equivalent to:
> view edgesFromAssociations: {1 -> 1 . 1 -> 4 . 1 -> 9}
>
>
> Alexandre
>
>>
>>>
>>>> Now when I do that the original shapes (squares inside squares) that I have turn into a single one and I do not understand why.
>>>
>>> The interaction in Mondrian works well, but I agree this is a bit rough to use. The following:
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>> view interaction
>>> whenEnteringUpdateNode: [:node |
>>> view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses.].
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>> means that when you enter the node, you replace everything under the node with some edges. You therefore discard the classes in it.
>>
>> ah I could not get it then.
>> Indeed the api sucks then
>>
>>> I propose two versions of your code. A long (and ugly one), and a much nicer one, but which does a slightly different thing:
>>
>> thanks I will have a look.
>>
>>>
>>> The script draw edges between a packages and classes.
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>> view interaction
>>> whenEnteringUpdateNode: [:node |
>>> view shape rectangle
>>> fillColor: Color orange;
>>> height: 7;
>>> width: 7.
>>> view nodes: node classes.
>>> view gridLayout gapSize: 2.
>>> view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses ]
>>>
>>> whenLeavingUpdateNode:  [:node |
>>> view shape rectangle
>>> fillColor: Color orange;
>>> height: 7;
>>> width: 7.
>>> view nodes: node classes.
>>> view gridLayout gapSize: 2 ]
>>>
>>> withLayoutUpdate: true.
>>>
>>> view nodes: model allPackages
>>> forEach: [:pack |
>>> view shape rectangle
>>> fillColor: Color orange;
>>> height: 7;
>>> width: 7.
>>> view nodes: pack classes.
>>> view gridLayout gapSize: 2.
>>> ].
>>>
>>> view  gridLayout.
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>>
>>>
>>>
>>> This version draws edges between classes
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>> view nodes: model allPackages
>>> forEach: [:pack |
>>> view shape rectangle
>>> fillColor: Color orange;
>>> height: 7;
>>> width: 7.
>>> view interaction
>>> whenEnteringUpdateNode: [:node |
>>> view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses ].
>>> view nodes: pack classes.
>>> view gridLayout gapSize: 2.
>>> ].
>>>
>>> view  gridLayout.
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"From an abstract enough point of view, any two things are similar."




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

Re: Mondrian question

Stéphane Ducasse
In reply to this post by abergel
How can I make the edge not from the package but the class inside the originating package?


> view interaction
> whenEnteringUpdateNode: [:node |
> view shape rectangle
> fillColor: Color orange;
> height: 7;
> width: 7.
> view nodes: node classes.
> view gridLayout gapSize: 2.
> view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses ]
>
> whenLeavingUpdateNode:  [:node |
> view shape rectangle
> fillColor: Color orange;
> height: 7;
> width: 7.
> view nodes: node classes.
> view gridLayout gapSize: 2 ]
>
> withLayoutUpdate: true.
>
> view nodes: model allPackages
> forEach: [:pack |
> view shape rectangle
> fillColor: Color orange;
> height: 7;
> width: 7.
> view nodes: pack classes.
> view gridLayout gapSize: 2.
> ].
>
> view  gridLayout.


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

Re: Mondrian question

Stéphane Ducasse
In reply to this post by abergel
Ok that way :)

this is cool that package and classes can understand the same message :)

On Jun 15, 2011, at 4:59 PM, Alexandre Bergel wrote:

> view nodes: model allPackages
> forEach: [:pack |
> view shape rectangle
> fillColor: Color orange;
> height: 7;
> width: 7.
> view interaction
> whenEnteringUpdateNode: [:node |
> view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses ].
> view nodes: pack classes.
> view gridLayout gapSize: 2.
> ].
>
> view  gridLayout.


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

Re: Mondrian question

abergel
In reply to this post by Stéphane Ducasse
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
view nodes: model allPackages
                forEach: [:pack |
                        view shape rectangle
                                fillColor: Color orange;
                                height: 7;
                                width: 7.
                        view interaction
                                whenEnteringUpdateNode: [:node |
                                        view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses ].
                        view nodes: pack classes.
                        view gridLayout gapSize: 2.
                ].

view  gridLayout.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Alexandre


On 15 Jun 2011, at 14:54, Stéphane Ducasse wrote:

> How can I make the edge not from the package but the class inside the originating package?
>
>
>> view interaction
>> whenEnteringUpdateNode: [:node |
>> view shape rectangle
>> fillColor: Color orange;
>> height: 7;
>> width: 7.
>> view nodes: node classes.
>> view gridLayout gapSize: 2.
>> view edges: {node}  from: #yourself  toAll:  #sureReferencingClasses ]
>>
>> whenLeavingUpdateNode:  [:node |
>> view shape rectangle
>> fillColor: Color orange;
>> height: 7;
>> width: 7.
>> view nodes: node classes.
>> view gridLayout gapSize: 2 ]
>>
>> withLayoutUpdate: true.
>>
>> view nodes: model allPackages
>> forEach: [:pack |
>> view shape rectangle
>> fillColor: Color orange;
>> height: 7;
>> width: 7.
>> view nodes: pack classes.
>> view gridLayout gapSize: 2.
>> ].
>>
>> view  gridLayout.
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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






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

Re: Mondrian question

Stéphane Ducasse
In reply to this post by Tudor Girba-2

On Jun 15, 2011, at 8:52 PM, Tudor Girba wrote:

> Stef,
>
> view edges: collection from: block1 to: block2
>
> tries to create a edge for "each" element in the "collection" between the nodes that have the following entities behind:
> - block1 value: each
> - block2 value: each

Ok I finally got it.... but the api sucks

may be edges: should be
       
        edgesFromEntities: collection computeFrom: block1 computeTo: block2

it sucks also :)

edges: is bad
because it does indicate that the entities are not edges:

buildEdgesFor: collection ....

Stef






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

Re: Mondrian question

Tudor Girba-2

On 15 Jun 2011, at 21:15, Stéphane Ducasse wrote:

>
> On Jun 15, 2011, at 8:52 PM, Tudor Girba wrote:
>
>> Stef,
>>
>> view edges: collection from: block1 to: block2
>>
>> tries to create a edge for "each" element in the "collection" between the nodes that have the following entities behind:
>> - block1 value: each
>> - block2 value: each
>
> Ok I finally got it.... but the api sucks

It does not :).

Doru

> may be edges: should be
>
> edgesFromEntities: collection computeFrom: block1 computeTo: block2
>
> it sucks also :)
>
> edges: is bad
> because it does indicate that the entities are not edges:
>
> buildEdgesFor: collection ....
>
> Stef
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Problem solving should be focused on describing
the problem in a way that makes the solution obvious."





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

Re: Mondrian question

Stéphane Ducasse
>>
>>
>>> Stef,
>>>
>>> view edges: collection from: block1 to: block2
>>>
>>> tries to create a edge for "each" element in the "collection" between the nodes that have the following entities behind:
>>> - block1 value: each
>>> - block2 value: each
>>
>> Ok I finally got it.... but the api sucks
>
> It does not :).

So we were three to be at least confused and two of us did a lot of diagram with mondrian. May be the api is only usable by 3 + years in mondrian.

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

Re: Mondrian question

Tudor Girba-2
Hi,

On 15 Jun 2011, at 21:31, Stéphane Ducasse wrote:

>>>
>>>
>>>> Stef,
>>>>
>>>> view edges: collection from: block1 to: block2
>>>>
>>>> tries to create a edge for "each" element in the "collection" between the nodes that have the following entities behind:
>>>> - block1 value: each
>>>> - block2 value: each
>>>
>>> Ok I finally got it.... but the api sucks
>>
>> It does not :).
>
> So we were three to be at least confused and two of us did a lot of diagram with mondrian. May be the api is only usable by 3 + years in mondrian.

Who are those that used Mondrian repeatedly and still cannot figure out what edges:from:to: means? I can think of several other issues (such as debugging a visualization), but I cannot imagine that someone cannot remember what a method with 3 parameters does, especially when that method has a long explanatory comment.

I know significantly more people that can use Mondrian, without knowing Smalltalk even :). That is not an argument, especially that no better alternative was proposed.

I just wanted to point out that "sucks" can easily spawn a simplistic debate :). Let's focus on what we want to have.

Cheers,
Doru


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

--
www.tudorgirba.com

"Next time you see your life passing by, say 'hi' and get to know her."




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

Re: Mondrian question

Stéphane Ducasse

On Jun 17, 2011, at 1:09 AM, Tudor Girba wrote:

> Hi,
>
> On 15 Jun 2011, at 21:31, Stéphane Ducasse wrote:
>
>>>>
>>>>
>>>>> Stef,
>>>>>
>>>>> view edges: collection from: block1 to: block2
>>>>>
>>>>> tries to create a edge for "each" element in the "collection" between the nodes that have the following entities behind:
>>>>> - block1 value: each
>>>>> - block2 value: each
>>>>
>>>> Ok I finally got it.... but the api sucks
>>>
>>> It does not :).
>>
>> So we were three to be at least confused and two of us did a lot of diagram with mondrian. May be the api is only usable by 3 + years in mondrian.
>
> Who are those that used Mondrian repeatedly and still cannot figure out what edges:from:to: means? I can think of several other issues (such as debugging a visualization), but I cannot imagine that someone cannot remember what a method with 3 parameters does, especially when that method has a long explanatory comment.

so cyrille and jannik are plain silly.
Too bad cyrille and jannik were our expert in mondrian here.


> I know significantly more people that can use Mondrian, without knowing Smalltalk even :). That is not an argument, especially that no better alternative was proposed.
>
> I just wanted to point out that "sucks" can easily spawn a simplistic debate :). Let's focus on what we want to have.

Something that tells me how to pass the correct arguments and edges: does not work because these are not the edges that you pass.

buildEdgesFrom: aCollection usingFrom: usingTo:

would be something in the right direction.



>
> Cheers,
> Doru
>
>
>> Stef
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "Next time you see your life passing by, say 'hi' and get to know her."
>
>
>
>
> _______________________________________________
> 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: Mondrian question

Tudor Girba-2
Hi,

On 18 Jun 2011, at 14:50, Stéphane Ducasse wrote:

>
> On Jun 17, 2011, at 1:09 AM, Tudor Girba wrote:
>
>> Hi,
>>
>> On 15 Jun 2011, at 21:31, Stéphane Ducasse wrote:
>>
>>>>>
>>>>>
>>>>>> Stef,
>>>>>>
>>>>>> view edges: collection from: block1 to: block2
>>>>>>
>>>>>> tries to create a edge for "each" element in the "collection" between the nodes that have the following entities behind:
>>>>>> - block1 value: each
>>>>>> - block2 value: each
>>>>>
>>>>> Ok I finally got it.... but the api sucks
>>>>
>>>> It does not :).
>>>
>>> So we were three to be at least confused and two of us did a lot of diagram with mondrian. May be the api is only usable by 3 + years in mondrian.
>>
>> Who are those that used Mondrian repeatedly and still cannot figure out what edges:from:to: means? I can think of several other issues (such as debugging a visualization), but I cannot imagine that someone cannot remember what a method with 3 parameters does, especially when that method has a long explanatory comment.
>
> so cyrille and jannik are plain silly.
> Too bad cyrille and jannik were our expert in mondrian here.

Something does not match. Could we be more specific?

Jannik and Cyrille are certainly not silly, especially that they did manage to write so many of these little pictures before :). So, it is obvious that what seems to constitute a problem now, was not a problem a while back.

Please let me know what exactly you did not understand. Was it that it was not clear what the block is applied to, or was it more that you did not know why an edge was not drawn, even if you thought that you wrote the right thing knowing what the method does?

And once you read the various examples, is it really that cryptic this method? Please also consider it from the point of view of the whole sentence: "view edges:from:to:"

>> I know significantly more people that can use Mondrian, without knowing Smalltalk even :). That is not an argument, especially that no better alternative was proposed.
>>
>> I just wanted to point out that "sucks" can easily spawn a simplistic debate :). Let's focus on what we want to have.
>
> Something that tells me how to pass the correct arguments and edges: does not work because these are not the edges that you pass.
>
> buildEdgesFrom: aCollection usingFrom: usingTo:
> would be something in the right direction.

I suggest an even better approach:

buildEdgesFromACollectionWithEntities:
        usingATransformationBlockAppliedOnEachToGetTheOrigin:
        andUsingATransformationBlockAppliedOnEachToGetTheTarget:

Stef, this API is really no different than the API of Seaside. It is based a convention. You could argue in the same way that I do not know that I should pass a block after "html div: " and what that block should contain.

It is important to clarify the root of the problem, and I still doubt that the problem is in the name. I believe the problem comes more from the complexity of the operator (traversal + two transformations for each element + looking up corresponding nodes), and the lack of debugging possibilities in Mondrian. Or maybe it is something else.

So, let's take the positive side of this experience and see what is needed.

Cheers,
Doru


>
>
>>
>> Cheers,
>> Doru
>>
>>
>>> Stef
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>>
>> "Next time you see your life passing by, say 'hi' and get to know her."
>>
>>
>>
>>
>> _______________________________________________
>> 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

--
www.tudorgirba.com

"Being happy is a matter of choice."




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

Re: Mondrian question

Stéphane Ducasse
>>
>> Something that tells me how to pass the correct arguments and edges: does not work because these are not the edges that you pass.
>>
>> buildEdgesFrom: aCollection usingFrom: usingTo:
>> would be something in the right direction.
>
> I suggest an even better approach:
>
> buildEdgesFromACollectionWithEntities:
> usingATransformationBlockAppliedOnEachToGetTheOrigin:
> andUsingATransformationBlockAppliedOnEachToGetTheTarget:

you are not fun because you do not want to listen.
Perfect to me.
I will not talk anymore.

jannik if you want to say something say it.

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

Re: Mondrian question

Tudor Girba-2
Hi,

On 18 Jun 2011, at 18:36, Stéphane Ducasse wrote:

>>>
>>> Something that tells me how to pass the correct arguments and edges: does not work because these are not the edges that you pass.
>>>
>>> buildEdgesFrom: aCollection usingFrom: usingTo:
>>> would be something in the right direction.
>>
>> I suggest an even better approach:
>>
>> buildEdgesFromACollectionWithEntities:
>> usingATransformationBlockAppliedOnEachToGetTheOrigin:
>> andUsingATransformationBlockAppliedOnEachToGetTheTarget:
>
> you are not fun because you do not want to listen.
> Perfect to me.
> I will not talk anymore.

I think the fun was spoiled with "sucks", and I think it is a pity that the only thing that you replied to is my feeble attempt to a joke. I believe I brought in arguments, and that I wanted to discuss arguments. So, let's talk arguments.

Cheers,
Doru


> jannik if you want to say something say it.
>
> Stef
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"The coherence of a trip is given by the clearness of the goal."





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

Re: Mondrian question

jannik laval
Hi all,

Doru, I will just explain the context :)
- we have a new big case study on a java source code. We need to build demonstration on-the-fly to show that: (i) our api is simple and efficient, and (ii) everybody can use it.
- I did not build any visualization since 5 months, since I begin to write my thesis, and other papers.

So, when we would like to use Mondrian, the message edges:from:to: is a real problem. It is not the only one, but it illustrates well the problem.
For me, edges:from:to: should be used like "edges: aCollectionOfAssociation from: #first to:#second".
To give a collection of nodes is not intuitive for 2 reasons:
- the first one is in my example: I always think to provide edges and not nodes.
- the second is: why to give nodes ? we should have them because we are building a node-visualization. So the selection of good nodes should be done in the blocks from:to:.
In fact, I think that a first thing to do is to use the methods edgesFrom:to: (that I just discover...)

Another problem that I encounter with Glamour also, is the debugging. And I really think that problems  could be resolved with a good integration with the debugger. For now, it is not possible to understand easily why a script does not run as we want. 
We should think how to integrate the debugger in Mondrian and Glamour scripting.

The discussion is open :)
Jannik

On Jun 18, 2011, at 19:03 , Tudor Girba wrote:

Hi,

On 18 Jun 2011, at 18:36, Stéphane Ducasse wrote:


Something that tells me how to pass the correct arguments and edges: does not work because these are not the edges that you pass.

buildEdgesFrom: aCollection usingFrom: usingTo:
would be something in the right direction.

I suggest an even better approach:

buildEdgesFromACollectionWithEntities:
usingATransformationBlockAppliedOnEachToGetTheOrigin:
andUsingATransformationBlockAppliedOnEachToGetTheTarget:




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