edgesFrom: generates a DNU

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

edgesFrom: generates a DNU

Stéphane Ducasse
view := ROMondrianViewBuilder view: ROView new.
luClasses := luModel allModelClasses.
view nodes: luClasses.
view shape rectangle size: [ :cls | cls queryAllOutgoingInvocations size ].
view edgesFrom: #superclass.
view treeLayout.
view open


When I execute the following code I get

setEdgesAttachPoint: attachPointClass
       
        self edges do: [ :ed |
                (ed isShapedAs: ROShape)
                        ifTrue: [
                                (ed getShape: ROShape) attachPoint: attachPointClass instance ]
                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                                                                       
                        ifFalse: [ ROLine new color: self shape color; attachPoint: attachPointClass instance ] ]


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

Re: edgesFrom: generates a DNU

Stéphane Ducasse
I tried in 4.8 and it does not work either.
I do not get it because I took that from alex slides.
Stef

On Sep 27, 2013, at 1:48 PM, Stéphane Ducasse <[hidden email]> wrote:

> view := ROMondrianViewBuilder view: ROView new.
> luClasses := luModel allModelClasses.
> view nodes: luClasses.
> view shape rectangle size: [ :cls | cls queryAllOutgoingInvocations size ].
> view edgesFrom: #superclass.
> view treeLayout.
> view open
>
>
> When I execute the following code I get
>
> setEdgesAttachPoint: attachPointClass
>
> self edges do: [ :ed |
> (ed isShapedAs: ROShape)
> ifTrue: [
> (ed getShape: ROShape) attachPoint: attachPointClass instance ]
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> ifFalse: [ ROLine new color: self shape color; attachPoint: attachPointClass instance ] ]
>
>
> _______________________________________________
> 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: edgesFrom: generates a DNU

Stéphane Ducasse
In reply to this post by Stéphane Ducasse
Hi guys

I'm preparing a lecture and if such kind of scripts do not work I will have to remove the roassal/mondrian part.
And this is a pity.
So can somebody give me a hint?
Stef

On Sep 27, 2013, at 1:48 PM, Stéphane Ducasse <[hidden email]> wrote:

> view := ROMondrianViewBuilder view: ROView new.
> luClasses := luModel allModelClasses.
> view nodes: luClasses.
> view shape rectangle size: [ :cls | cls queryAllOutgoingInvocations size ].
> view edgesFrom: #superclass.
> view treeLayout.
> view open
>
>
> When I execute the following code I get
>
> setEdgesAttachPoint: attachPointClass
>
> self edges do: [ :ed |
> (ed isShapedAs: ROShape)
> ifTrue: [
> (ed getShape: ROShape) attachPoint: attachPointClass instance ]
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> ifFalse: [ ROLine new color: self shape color; attachPoint: attachPointClass instance ] ]
>
>
> _______________________________________________
> 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: edgesFrom: generates a DNU

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

Same answer: I had this problem before. When you set the shape, it is the shape for the nodes you add after. So change the shape and nodes: statement and it works.

Good luck!

view := ROMondrianViewBuilder view: ROView new.
luClasses := luModel allModelClasses.
view shape rectangle size: [ :cls | cls queryAllOutgoingInvocations size ].
view nodes: luClasses.
view edgesFrom: #superclass.
view treeLayout.
view open

On Sep 27, 2013, at 1:48 PM, Stéphane Ducasse wrote:

view := ROMondrianViewBuilder view: ROView new.
luClasses := luModel allModelClasses.
view nodes: luClasses.
view shape rectangle size: [ :cls | cls queryAllOutgoingInvocations size ].
view edgesFrom: #superclass.
view treeLayout.
view open


When I execute the following code I get

setEdgesAttachPoint: attachPointClass

self edges do: [ :ed |
(ed isShapedAs: ROShape)
ifTrue: [
(ed getShape: ROShape) attachPoint: attachPointClass instance ]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ifFalse: [ ROLine new color: self shape color; attachPoint: attachPointClass instance ] ]


_______________________________________________
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: edgesFrom: generates a DNU

abergel
The syntax is indeed not ideal. It is too easy to get it wrong.
Let me know if you have other questions.

Alexandre


On Sep 27, 2013, at 12:12 PM, Diego Lont <[hidden email]> wrote:

> Stef,
>
> Same answer: I had this problem before. When you set the shape, it is the shape for the nodes you add after. So change the shape and nodes: statement and it works.
>
> Good luck!
>
>> view := ROMondrianViewBuilder view: ROView new.
>> luClasses := luModel allModelClasses.
>> view shape rectangle size: [ :cls | cls queryAllOutgoingInvocations size ].
>> view nodes: luClasses.
>> view edgesFrom: #superclass.
>> view treeLayout.
>> view open
>
> On Sep 27, 2013, at 1:48 PM, Stéphane Ducasse wrote:
>
>> view := ROMondrianViewBuilder view: ROView new.
>> luClasses := luModel allModelClasses.
>> view nodes: luClasses.
>> view shape rectangle size: [ :cls | cls queryAllOutgoingInvocations size ].
>> view edgesFrom: #superclass.
>> view treeLayout.
>> view open
>>
>>
>> When I execute the following code I get
>>
>> setEdgesAttachPoint: attachPointClass
>>
>> self edges do: [ :ed |
>> (ed isShapedAs: ROShape)
>> ifTrue: [
>> (ed getShape: ROShape) attachPoint: attachPointClass instance ]
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>> ifFalse: [ ROLine new color: self shape color; attachPoint: attachPointClass instance ] ]
>>
>>
>> _______________________________________________
>> 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: edgesFrom: generates a DNU

Tudor Girba-2
You also have a more basic set of messages like:
edges: aCollectionOfEntities from: aFromBlock to: aToBlock using: aShape 

However, the problem with those is that you get into too parentheses quickly, and you cannot easily add interaction in the same scheme.

So, the newer API is based on a pattern similar to most platforms for graphics: you define various brush variables first, and then you draw them. The nice thing about this is that it is easily extensible, but it is true that the casual connection is not obvious in the syntax.

It would be interesting to work on a new API from scratch that is a bit at a higher level than Roassal is.

Cheers,
Doru


On Fri, Sep 27, 2013 at 11:00 PM, Alexandre Bergel <[hidden email]> wrote:
The syntax is indeed not ideal. It is too easy to get it wrong.
Let me know if you have other questions.

Alexandre


On Sep 27, 2013, at 12:12 PM, Diego Lont <[hidden email]> wrote:

> Stef,
>
> Same answer: I had this problem before. When you set the shape, it is the shape for the nodes you add after. So change the shape and nodes: statement and it works.
>
> Good luck!
>
>> view := ROMondrianViewBuilder view: ROView new.
>> luClasses := luModel allModelClasses.
>> view shape rectangle size: [ :cls | cls queryAllOutgoingInvocations size ].
>> view nodes: luClasses.
>> view edgesFrom: #superclass.
>> view treeLayout.
>> view open
>
> On Sep 27, 2013, at 1:48 PM, Stéphane Ducasse wrote:
>
>> view := ROMondrianViewBuilder view: ROView new.
>> luClasses := luModel allModelClasses.
>> view nodes: luClasses.
>> view shape rectangle size: [ :cls | cls queryAllOutgoingInvocations size ].
>> view edgesFrom: #superclass.
>> view treeLayout.
>> view open
>>
>>
>> When I execute the following code I get
>>
>> setEdgesAttachPoint: attachPointClass
>>
>>      self edges do: [ :ed |
>>              (ed isShapedAs: ROShape)
>>                      ifTrue: [
>>                              (ed getShape: ROShape) attachPoint: attachPointClass instance ]
>>                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>>                      ifFalse: [ ROLine new color: self shape color; attachPoint: attachPointClass instance ] ]
>>
>>
>> _______________________________________________
>> 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



--

"Every thing has its own flow"

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