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 <alexandre.bergel@me.com> 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 <diego.lont@delware.nl> 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
>> 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



--
www.tudorgirba.com

"Every thing has its own flow"