migrating mondrian to roassal - MOLineShape>>frompositions & view domain

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

migrating mondrian to roassal - MOLineShape>>frompositions & view domain

Ben Coman
I have just downloaded Moose47 and am starting to migrate my app from
Mondrian to Roassal.
For the code below where 'a mondrian'  /becomes/  'a roassal' ...

At  "#1" I get MNU ROLine>>fromPositions
For now I worked around this by deleting #fromPositions: and #toPositions:
but how do I get similar functionality to manage where the endpoints ?
I did find in "attachPoint := ROShorterDistanceAttachPoint instance"  in
ROLine>>initialize but it would be good to get an idea of the overall
architecture for this.

At "#2" I get MNU ROMondrianViewBuilder>>domain - where #domain returns
an OrderedList of all the model entities, of which I ask each for all
its relationship links to other model entities to define the edges.
For now I worked around this by factoring "EpcimRoot withAllSubclasses"
out to a temporary variable, but I am wondering how in future to access
the model entities of the graph.
I did find "#elementsWithModelDo:"  in
ROMondrianViewBuilder>>rawEdgesFrom:to: but not sure whether that is a
public/private method.


----------------------
        a mondrian
            title: 'Class Definition - Full Model' ;
            painting:
            [   :view    
                :selection |
               
                view shape label.
                view interaction popupText: [ : element | element class
comment ].
                view nodes: (EpcimRoot withAllSubclasses).
                view edgesFrom: #superclass.

                (view shape line)     "#1: /was/  a MOStraightLine  
/becomes/  a ROLine "
                    color: Color lightBrown.
                    fromPositions: #(#center);
                    toPositions: #(#center).

                view edges: view domain   "#2: view /was/  a
MOViewRenderer  /becomes/  a ROMondrianViewBuilder"
                    from: #yourself toAll: [ :x | x relations collect: [
:z | z key ] ].
                view horizontalTreeLayout .                          
            ]


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

Re: migrating mondrian to roassal - MOLineShape>>frompositions & view domain

Ben Coman
Just correcting myself, I should have said "used to return" in #2.
Ben Coman wrote:

> I have just downloaded Moose47 and am starting to migrate my app from
> Mondrian to Roassal.
> For the code below where 'a mondrian'  /becomes/  'a roassal' ...
>
> At  "#1" I get MNU ROLine>>fromPositions
> For now I worked around this by deleting #fromPositions: and
> #toPositions:
> but how do I get similar functionality to manage where the endpoints ?
> I did find in "attachPoint := ROShorterDistanceAttachPoint instance"  
> in ROLine>>initialize but it would be good to get an idea of the
> overall architecture for this.
>
> At "#2" I get MNU ROMondrianViewBuilder>>domain - where #domain USED
> TO return an OrderedList of all the model entities, of which I ask
> each for all its relationship links to other model entities to define
> the edges.
> For now I worked around this by factoring "EpcimRoot
> withAllSubclasses" out to a temporary variable, but I am wondering how
> in future to access the model entities of the graph.
> I did find "#elementsWithModelDo:"  in
> ROMondrianViewBuilder>>rawEdgesFrom:to: but not sure whether that is a
> public/private method.
>
>
> ----------------------
>        a mondrian            title: 'Class Definition - Full Model' ;
>            painting:
>            [   :view                   :selection |
>                              view shape label.
>                view interaction popupText: [ : element | element class
> comment ].
>                view nodes: (EpcimRoot withAllSubclasses).
>                view edgesFrom: #superclass.
>
>                (view shape line)     "#1: /was/  a MOStraightLine  
> /becomes/  a ROLine "
>                    color: Color lightBrown.
>                    fromPositions: #(#center);
>                    toPositions: #(#center).
>
>                view edges: view domain   "#2: view /was/  a
> MOViewRenderer  /becomes/  a ROMondrianViewBuilder"
>                    from: #yourself toAll: [ :x | x relations collect:
> [ :z | z key ] ].
>                view horizontalTreeLayout .                          
>            ]
>
>
>   _______________________________________________
> 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: migrating mondrian to roassal - MOLineShape>>frompositions & view domain

Ben Coman
Also I got a MNU ROMondrianViewBuilder>>horizontalTreeLayout, so I
copied it from Mondrian - see attached since I could not write to the repo.


btw, this is using Roassal together with Glamour.

>
> Ben Coman wrote:
>> I have just downloaded Moose47 and am starting to migrate my app from
>> Mondrian to Roassal.
>> For the code below where 'a mondrian'  /becomes/  'a roassal' ...
>>
>> At  "#1" I get MNU ROLine>>fromPositions
>> For now I worked around this by deleting #fromPositions: and
>> #toPositions:
>> but how do I get similar functionality to manage where the endpoints ?
>> I did find in "attachPoint := ROShorterDistanceAttachPoint instance"  
>> in ROLine>>initialize but it would be good to get an idea of the
>> overall architecture for this.
>>
>> At "#2" I get MNU ROMondrianViewBuilder>>domain - where #domain USED
>> TO return an OrderedList of all the model entities, of which I ask
>> each for all its relationship links to other model entities to define
>> the edges.
>> For now I worked around this by factoring "EpcimRoot
>> withAllSubclasses" out to a temporary variable, but I am wondering
>> how in future to access the model entities of the graph.
>> I did find "#elementsWithModelDo:"  in
>> ROMondrianViewBuilder>>rawEdgesFrom:to: but not sure whether that is
>> a public/private method.
>>
>>
>> ----------------------
>>        a mondrian            title: 'Class Definition - Full Model' ;
>>            painting:
>>            [   :view                   :selection |
>>                              view shape label.
>>                view interaction popupText: [ : element | element
>> class comment ].
>>                view nodes: (EpcimRoot withAllSubclasses).
>>                view edgesFrom: #superclass.
>>
>>                (view shape line)     "#1: /was/  a MOStraightLine  
>> /becomes/  a ROLine "
>>                    color: Color lightBrown.
>>                    fromPositions: #(#center);
>>                    toPositions: #(#center).
>>
>>                view edges: view domain   "#2: view /was/  a
>> MOViewRenderer  /becomes/  a ROMondrianViewBuilder"
>>                    from: #yourself toAll: [ :x | x relations collect:
>> [ :z | z key ] ].
>>                view horizontalTreeLayout .                          
>>            ]
>>
>>
>>   _______________________________________________
>> 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
>

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

Roassal-BenComan.254.mcz (261K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: migrating mondrian to roassal - MOLineShape>>frompositions & view domain

abergel
In reply to this post by Ben Coman
Hi Ben!

Thanks for trying out Roassal. Your feedback is a serious contribution!

In Roassal 1.78 I have organized better the examples. It should now be explicit the meaning of the colors.
I also added an example called attachPoint in the edge category. I think this answer your first question.

For your second question, you can simply do:
view raw elements collect: #model

elementsWithModelDo: can be safely used.

Cheers,
Alexandre

On Jul 27, 2012, at 11:30 PM, Ben Coman <[hidden email]> wrote:

> I have just downloaded Moose47 and am starting to migrate my app from Mondrian to Roassal.
> For the code below where 'a mondrian'  /becomes/  'a roassal' ...
>
> At  "#1" I get MNU ROLine>>fromPositions
> For now I worked around this by deleting #fromPositions: and #toPositions:
> but how do I get similar functionality to manage where the endpoints ?
> I did find in "attachPoint := ROShorterDistanceAttachPoint instance"  in ROLine>>initialize but it would be good to get an idea of the overall architecture for this.
>
> At "#2" I get MNU ROMondrianViewBuilder>>domain - where #domain returns an OrderedList of all the model entities, of which I ask each for all its relationship links to other model entities to define the edges.
> For now I worked around this by factoring "EpcimRoot withAllSubclasses" out to a temporary variable, but I am wondering how in future to access the model entities of the graph.
> I did find "#elementsWithModelDo:"  in ROMondrianViewBuilder>>rawEdgesFrom:to: but not sure whether that is a public/private method.
>
>
> ----------------------
>       a mondrian            title: 'Class Definition - Full Model' ;
>           painting:
>           [   :view                   :selection |
>                             view shape label.
>               view interaction popupText: [ : element | element class comment ].
>               view nodes: (EpcimRoot withAllSubclasses).
>               view edgesFrom: #superclass.
>
>               (view shape line)     "#1: /was/  a MOStraightLine  /becomes/  a ROLine "
>                   color: Color lightBrown.
>                   fromPositions: #(#center);
>                   toPositions: #(#center).
>
>               view edges: view domain   "#2: view /was/  a MOViewRenderer  /becomes/  a ROMondrianViewBuilder"
>                   from: #yourself toAll: [ :x | x relations collect: [ :z | z key ] ].
>               view horizontalTreeLayout .                                     ]
>
>
>  _______________________________________________
> 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: migrating mondrian to roassal - MOLineShape>>frompositions & view domain

abergel
In reply to this post by Ben Coman
In 1.79!
The example chooseLayout has been updated accordingly.

I am continuing proceedings your emails.

Thanks!

Cheers,
Alexandre


On Jul 28, 2012, at 3:13 AM, Ben Coman <[hidden email]> wrote:

> Also I got a MNU ROMondrianViewBuilder>>horizontalTreeLayout, so I copied it from Mondrian - see attached since I could not write to the repo.
>
>
> btw, this is using Roassal together with Glamour.
>>
>> Ben Coman wrote:
>>> I have just downloaded Moose47 and am starting to migrate my app from Mondrian to Roassal.
>>> For the code below where 'a mondrian'  /becomes/  'a roassal' ...
>>>
>>> At  "#1" I get MNU ROLine>>fromPositions
>>> For now I worked around this by deleting #fromPositions: and #toPositions:
>>> but how do I get similar functionality to manage where the endpoints ?
>>> I did find in "attachPoint := ROShorterDistanceAttachPoint instance"  in ROLine>>initialize but it would be good to get an idea of the overall architecture for this.
>>>
>>> At "#2" I get MNU ROMondrianViewBuilder>>domain - where #domain USED TO return an OrderedList of all the model entities, of which I ask each for all its relationship links to other model entities to define the edges.
>>> For now I worked around this by factoring "EpcimRoot withAllSubclasses" out to a temporary variable, but I am wondering how in future to access the model entities of the graph.
>>> I did find "#elementsWithModelDo:"  in ROMondrianViewBuilder>>rawEdgesFrom:to: but not sure whether that is a public/private method.
>>>
>>>
>>> ----------------------
>>>       a mondrian            title: 'Class Definition - Full Model' ;
>>>           painting:
>>>           [   :view                   :selection |
>>>                             view shape label.
>>>               view interaction popupText: [ : element | element class comment ].
>>>               view nodes: (EpcimRoot withAllSubclasses).
>>>               view edgesFrom: #superclass.
>>>
>>>               (view shape line)     "#1: /was/  a MOStraightLine  /becomes/  a ROLine "
>>>                   color: Color lightBrown.
>>>                   fromPositions: #(#center);
>>>                   toPositions: #(#center).
>>>
>>>               view edges: view domain   "#2: view /was/  a MOViewRenderer  /becomes/  a ROMondrianViewBuilder"
>>>                   from: #yourself toAll: [ :x | x relations collect: [ :z | z key ] ].
>>>               view horizontalTreeLayout .                                     ]
>>>
>>>
>>>  _______________________________________________
>>> 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
>>
>
> <Roassal-BenComan.254.mcz>_______________________________________________
> 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