What is the purpose of the first argument of this method?
MOViewRendered>> edges: aCollection from: aFromBlock toAll: aToBlock "aToBlock should return a collection, edges will be drawn from the element returned by aFromBlock to this collection"
^self edges: aCollection from: aFromBlock toAll: aToBlock using: self edgeShape
nicolas
The first argument provides the model behind the edge.
For example:
view nodes: classes. view edges: classes from: [:each | each ] toAll: [:each | each invokedClasses].
Behind each edge, there will be one class. If a class invokes multiple classes, the same class will be behind each of the corresponding edges.
Cheers, Doru
On 18 Feb 2011, at 10:45, Nicolas Anquetil wrote:
What is the purpose of the first argument of this method?
MOViewRendered>> edges: aCollection from: aFromBlock toAll: aToBlock "aToBlock should return a collection, edges will be drawn from the element returned by aFromBlock to this collection"
^self edges: aCollection from: aFromBlock toAll: aToBlock using: self edgeShape
nicolas _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Be rather willing to give than demanding to get."
thanks doru, but I am afraid I did not get it :-(
An edge goes from aNode to anotherNode, what do you mean by "behind the edge"
Behind each edge, there will be one class. If a class invokes multiple classes, the same class will be behind each of the corresponding edges.
this seems to be refering to the source of the edge, so why do you also need to put it "behind"?
nicolas
----- Mail original -----
De: "Tudor Girba" tudor.girba@gmail.com À: "Moose-related development" moose-dev@iam.unibe.ch Envoyé: Vendredi 18 Février 2011 10:48:30 Objet: [Moose-dev] Re: MOViewRendered>>edges:from:toAll: ??? The first argument provides the model behind the edge.
For example:
view nodes: classes. view edges: classes from: [:each | each ] toAll: [:each | each invokedClasses].
Behind each edge, there will be one class. If a class invokes multiple classes, the same class will be behind each of the corresponding edges.
Cheers, Doru
On 18 Feb 2011, at 10:45, Nicolas Anquetil wrote:
What is the purpose of the first argument of this method?
MOViewRendered>> edges: aCollection from: aFromBlock toAll: aToBlock "aToBlock should return a collection, edges will be drawn from the element returned by aFromBlock to this collection"
^self edges: aCollection from: aFromBlock toAll: aToBlock using: self edgeShape
nicolas _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Be rather willing to give than demanding to get."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
What Doru is saying is that there are actually two models when drawing with Mondrian: your domain model, which holds your data, and the Mondrian model, basically Node+Edge. The Mondrian model is built on top of your domain model using constructors such as #edges:from:toAll:
So the first argument of #edges:from:toAll: is the collection of data from your domain. To take another example:
view edges: someFamixInvocations from: #sender toAll: #candidates
will draw an edge from the sender (method) of the invocation to each candidate of the invocation.
On 18 févr. 2011, at 11:07, Nicolas Anquetil wrote:
thanks doru, but I am afraid I did not get it :-(
An edge goes from aNode to anotherNode, what do you mean by "behind the edge"
Behind each edge, there will be one class. If a class invokes multiple classes, the same class will be behind each of the corresponding edges.
this seems to be refering to the source of the edge, so why do you also need to put it "behind"?
nicolas
----- Mail original -----
De: "Tudor Girba" tudor.girba@gmail.com À: "Moose-related development" moose-dev@iam.unibe.ch Envoyé: Vendredi 18 Février 2011 10:48:30 Objet: [Moose-dev] Re: MOViewRendered>>edges:from:toAll: ??? The first argument provides the model behind the edge.
For example:
view nodes: classes. view edges: classes from: [:each | each ] toAll: [:each | each invokedClasses].
Behind each edge, there will be one class. If a class invokes multiple classes, the same class will be behind each of the corresponding edges.
Cheers, Doru
On 18 Feb 2011, at 10:45, Nicolas Anquetil wrote:
What is the purpose of the first argument of this method?
MOViewRendered>> edges: aCollection from: aFromBlock toAll: aToBlock "aToBlock should return a collection, edges will be drawn from the element returned by aFromBlock to this collection"
^self edges: aCollection from: aFromBlock toAll: aToBlock using: self edgeShape
nicolas _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Be rather willing to give than demanding to get."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Simon Denier
ok
thanks Simon, it is getting clearer
May I propose a longer (hopefully more explicit) comment?
"- aCollection is the collection of edges to represent. - aFromBlock will be called on each element of the collection and return one edge source each time. - aToBlock will be called similarly to return a collection of destination correpsonding to each source. Note that there is no restriction on the elements of aCollection, as long as aFromBlock returns a node and aToBlock returns a collection of nodes. For example: aView edges: someFamixInvocations from: #sender toAll: #candidates"
I agree that might seem a bit long for a typicall smalltalk comment ;-) , but it might help understand better how the thing works ... I would still like to specify more clearly that the "blocks" do not need to be blocks (#yourself, #sender, #candidates, ...) but this is already some start ...
nicolas
----- Mail original -----
De: "Simon Denier" simon.denier@gmail.com À: "Moose-related development" moose-dev@iam.unibe.ch Envoyé: Vendredi 18 Février 2011 12:30:39 Objet: [Moose-dev] Re: MOViewRendered>>edges:from:toAll: ??? What Doru is saying is that there are actually two models when drawing with Mondrian: your domain model, which holds your data, and the Mondrian model, basically Node+Edge. The Mondrian model is built on top of your domain model using constructors such as #edges:from:toAll:
So the first argument of #edges:from:toAll: is the collection of data from your domain. To take another example:
view edges: someFamixInvocations from: #sender toAll: #candidates
will draw an edge from the sender (method) of the invocation to each candidate of the invocation.
On 18 févr. 2011, at 11:07, Nicolas Anquetil wrote:
thanks doru, but I am afraid I did not get it :-(
An edge goes from aNode to anotherNode, what do you mean by "behind the edge"
Behind each edge, there will be one class. If a class invokes multiple classes, the same class will be behind each of the corresponding edges.
this seems to be refering to the source of the edge, so why do you also need to put it "behind"?
nicolas
----- Mail original -----
De: "Tudor Girba" tudor.girba@gmail.com À: "Moose-related development" moose-dev@iam.unibe.ch Envoyé: Vendredi 18 Février 2011 10:48:30 Objet: [Moose-dev] Re: MOViewRendered>>edges:from:toAll: ??? The first argument provides the model behind the edge.
For example:
view nodes: classes. view edges: classes from: [:each | each ] toAll: [:each | each invokedClasses].
Behind each edge, there will be one class. If a class invokes multiple classes, the same class will be behind each of the corresponding edges.
Cheers, Doru
On 18 Feb 2011, at 10:45, Nicolas Anquetil wrote:
What is the purpose of the first argument of this method?
MOViewRendered>> edges: aCollection from: aFromBlock toAll: aToBlock "aToBlock should return a collection, edges will be drawn from the element returned by aFromBlock to this collection"
^self edges: aCollection from: aFromBlock toAll: aToBlock using: self edgeShape
nicolas _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Be rather willing to give than demanding to get."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Simon Denier
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
In version 2.50 of Mondrian.
Thanks Nicolas.
Alexandre
On 18 Feb 2011, at 09:30, Nicolas Anquetil wrote:
ok
thanks Simon, it is getting clearer
May I propose a longer (hopefully more explicit) comment?
"- aCollection is the collection of edges to represent.
- aFromBlock will be called on each element of the collection and return one edge source each time.
- aToBlock will be called similarly to return a collection of destination correpsonding to each source.
Note that there is no restriction on the elements of aCollection, as long as aFromBlock returns a node and aToBlock returns a collection of nodes. For example: aView edges: someFamixInvocations from: #sender toAll: #candidates"
I agree that might seem a bit long for a typicall smalltalk comment ;-) , but it might help understand better how the thing works ... I would still like to specify more clearly that the "blocks" do not need to be blocks (#yourself, #sender, #candidates, ...) but this is already some start ...
nicolas
----- Mail original -----
De: "Simon Denier" simon.denier@gmail.com À: "Moose-related development" moose-dev@iam.unibe.ch Envoyé: Vendredi 18 Février 2011 12:30:39 Objet: [Moose-dev] Re: MOViewRendered>>edges:from:toAll: ??? What Doru is saying is that there are actually two models when drawing with Mondrian: your domain model, which holds your data, and the Mondrian model, basically Node+Edge. The Mondrian model is built on top of your domain model using constructors such as #edges:from:toAll:
So the first argument of #edges:from:toAll: is the collection of data from your domain. To take another example:
view edges: someFamixInvocations from: #sender toAll: #candidates
will draw an edge from the sender (method) of the invocation to each candidate of the invocation.
On 18 févr. 2011, at 11:07, Nicolas Anquetil wrote:
thanks doru, but I am afraid I did not get it :-(
An edge goes from aNode to anotherNode, what do you mean by "behind the edge"
Behind each edge, there will be one class. If a class invokes multiple classes, the same class will be behind each of the corresponding edges.
this seems to be refering to the source of the edge, so why do you also need to put it "behind"?
nicolas
----- Mail original -----
De: "Tudor Girba" tudor.girba@gmail.com À: "Moose-related development" moose-dev@iam.unibe.ch Envoyé: Vendredi 18 Février 2011 10:48:30 Objet: [Moose-dev] Re: MOViewRendered>>edges:from:toAll: ??? The first argument provides the model behind the edge.
For example:
view nodes: classes. view edges: classes from: [:each | each ] toAll: [:each | each invokedClasses].
Behind each edge, there will be one class. If a class invokes multiple classes, the same class will be behind each of the corresponding edges.
Cheers, Doru
On 18 Feb 2011, at 10:45, Nicolas Anquetil wrote:
What is the purpose of the first argument of this method?
MOViewRendered>> edges: aCollection from: aFromBlock toAll: aToBlock "aToBlock should return a collection, edges will be drawn from the element returned by aFromBlock to this collection"
^self edges: aCollection from: aFromBlock toAll: aToBlock using: self edgeShape
nicolas _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Be rather willing to give than demanding to get."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Simon Denier
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
thank you
actually I just realized I mixed up my examples, I wanted to put the one of Tudor where the collection is not of edges:
view edges: classes from: [:each | each ] toAll: [:each | each invokedClasses].
nicolas ----- Mail original -----
De: "Alexandre Bergel" alexandre@bergel.eu À: "Moose-related development" moose-dev@iam.unibe.ch Envoyé: Vendredi 18 Février 2011 15:48:08 Objet: [Moose-dev] Re: MOViewRendered>>edges:from:toAll: ??? In version 2.50 of Mondrian.
Thanks Nicolas.
Alexandre
On 18 Feb 2011, at 09:30, Nicolas Anquetil wrote:
ok
thanks Simon, it is getting clearer
May I propose a longer (hopefully more explicit) comment?
"- aCollection is the collection of edges to represent.
- aFromBlock will be called on each element of the collection and
return one edge source each time.
- aToBlock will be called similarly to return a collection of
destination correpsonding to each source. Note that there is no restriction on the elements of aCollection, as long as aFromBlock returns a node and aToBlock returns a collection of nodes. For example: aView edges: someFamixInvocations from: #sender toAll: #candidates"
I agree that might seem a bit long for a typicall smalltalk comment ;-) , but it might help understand better how the thing works ... I would still like to specify more clearly that the "blocks" do not need to be blocks (#yourself, #sender, #candidates, ...) but this is already some start ...
nicolas
----- Mail original -----
De: "Simon Denier" simon.denier@gmail.com À: "Moose-related development" moose-dev@iam.unibe.ch Envoyé: Vendredi 18 Février 2011 12:30:39 Objet: [Moose-dev] Re: MOViewRendered>>edges:from:toAll: ??? What Doru is saying is that there are actually two models when drawing with Mondrian: your domain model, which holds your data, and the Mondrian model, basically Node+Edge. The Mondrian model is built on top of your domain model using constructors such as #edges:from:toAll:
So the first argument of #edges:from:toAll: is the collection of data from your domain. To take another example:
view edges: someFamixInvocations from: #sender toAll: #candidates
will draw an edge from the sender (method) of the invocation to each candidate of the invocation.
On 18 févr. 2011, at 11:07, Nicolas Anquetil wrote:
thanks doru, but I am afraid I did not get it :-(
An edge goes from aNode to anotherNode, what do you mean by "behind the edge"
Behind each edge, there will be one class. If a class invokes multiple classes, the same class will be behind each of the corresponding edges.
this seems to be refering to the source of the edge, so why do you also need to put it "behind"?
nicolas
----- Mail original -----
De: "Tudor Girba" tudor.girba@gmail.com À: "Moose-related development" moose-dev@iam.unibe.ch Envoyé: Vendredi 18 Février 2011 10:48:30 Objet: [Moose-dev] Re: MOViewRendered>>edges:from:toAll: ??? The first argument provides the model behind the edge.
For example:
view nodes: classes. view edges: classes from: [:each | each ] toAll: [:each | each invokedClasses].
Behind each edge, there will be one class. If a class invokes multiple classes, the same class will be behind each of the corresponding edges.
Cheers, Doru
On 18 Feb 2011, at 10:45, Nicolas Anquetil wrote:
What is the purpose of the first argument of this method?
MOViewRendered>> edges: aCollection from: aFromBlock toAll: aToBlock "aToBlock should return a collection, edges will be drawn from the element returned by aFromBlock to this collection"
^self edges: aCollection from: aFromBlock toAll: aToBlock using: self edgeShape
nicolas _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Be rather willing to give than demanding to get."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Simon Denier
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Thanks for the comment.
Just a note. Blocks have to be blocks. The symbol just behaves like a special block in the case of Mondrian (because it understands value:).
Cheers, Doru
On 18 Feb 2011, at 13:30, Nicolas Anquetil wrote:
ok
thanks Simon, it is getting clearer
May I propose a longer (hopefully more explicit) comment?
"- aCollection is the collection of edges to represent.
- aFromBlock will be called on each element of the collection and return one edge source each time.
- aToBlock will be called similarly to return a collection of destination correpsonding to each source.
Note that there is no restriction on the elements of aCollection, as long as aFromBlock returns a node and aToBlock returns a collection of nodes. For example: aView edges: someFamixInvocations from: #sender toAll: #candidates"
I agree that might seem a bit long for a typicall smalltalk comment ;-) , but it might help understand better how the thing works ... I would still like to specify more clearly that the "blocks" do not need to be blocks (#yourself, #sender, #candidates, ...) but this is already some start ...
nicolas
----- Mail original -----
De: "Simon Denier" simon.denier@gmail.com À: "Moose-related development" moose-dev@iam.unibe.ch Envoyé: Vendredi 18 Février 2011 12:30:39 Objet: [Moose-dev] Re: MOViewRendered>>edges:from:toAll: ??? What Doru is saying is that there are actually two models when drawing with Mondrian: your domain model, which holds your data, and the Mondrian model, basically Node+Edge. The Mondrian model is built on top of your domain model using constructors such as #edges:from:toAll:
So the first argument of #edges:from:toAll: is the collection of data from your domain. To take another example:
view edges: someFamixInvocations from: #sender toAll: #candidates
will draw an edge from the sender (method) of the invocation to each candidate of the invocation.
On 18 févr. 2011, at 11:07, Nicolas Anquetil wrote:
thanks doru, but I am afraid I did not get it :-(
An edge goes from aNode to anotherNode, what do you mean by "behind the edge"
Behind each edge, there will be one class. If a class invokes multiple classes, the same class will be behind each of the corresponding edges.
this seems to be refering to the source of the edge, so why do you also need to put it "behind"?
nicolas
----- Mail original -----
De: "Tudor Girba" tudor.girba@gmail.com À: "Moose-related development" moose-dev@iam.unibe.ch Envoyé: Vendredi 18 Février 2011 10:48:30 Objet: [Moose-dev] Re: MOViewRendered>>edges:from:toAll: ??? The first argument provides the model behind the edge.
For example:
view nodes: classes. view edges: classes from: [:each | each ] toAll: [:each | each invokedClasses].
Behind each edge, there will be one class. If a class invokes multiple classes, the same class will be behind each of the corresponding edges.
Cheers, Doru
On 18 Feb 2011, at 10:45, Nicolas Anquetil wrote:
What is the purpose of the first argument of this method?
MOViewRendered>> edges: aCollection from: aFromBlock toAll: aToBlock "aToBlock should return a collection, edges will be drawn from the element returned by aFromBlock to this collection"
^self edges: aCollection from: aFromBlock toAll: aToBlock using: self edgeShape
nicolas _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Be rather willing to give than demanding to get."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Simon Denier
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"We cannot reach the flow of things unless we let go."