Roassal-Magritte link semantics

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

Roassal-Magritte link semantics

Ben Coman

For a long time I have had the code below linking Magritte-Roassal.  
Originally I had expected ":view" to hold aROView, and it was a surprise
when I found out held aROMondrianViewBuilder instead.
While it makes sense to have had a drop in replacement for the
Magritte-Mondrian, and it is simple to get the ROView from the
ROMondrianBuilder, it feels inelegant to have to do this each time.
---
browser transmit
    from: #pane1
    to: #pane2
    andShow:
    [    :a |
         a roassal
             title: 'Instance Model Full View';
             painting:
            [     :view :selection  |  | rawView |
                   rawView := view raw.
                 ...etc...
            ]
    ].

---
Looking in from outside and considering long term broadening use of
Roassal outside of Mondrian, it would "feel" better if ...
    andShow: [ :a | a roassal....
passed aROView as a parameter to #painting, and the Mondrian drop-in
replacement to be something like ...
    andShow: [ :a | a roassalMondrian
    andShow: [ :a | a roMondrian
    andShow: [ :a | a mondrianBuilder
which passed aROMondrianBuilder.

cheers -ben

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

Re: Roassal-Magritte link semantics

Tudor Girba-2
Hi,

I actually find it quite elegant as it is now.

The reasons are as follows:
1. there will be more scripts in the high level api than in the low
level one of Roassal
2. you can still make use of the roassal quite easily by specifying
"view raw" in all the low level commands (no need to store it in a
variable)
3. ideally, we should still have only one entry point to eliminate confusion
4. if you want to write a Roassal script, it will be longer and will
not fit in a block anyway. Thus, you would put the visualization in a
method and all you have to do is to pass "view raw" to it

Cheers,
Doru


On Sun, Sep 30, 2012 at 3:42 AM, Ben Coman <[hidden email]> wrote:

>
> For a long time I have had the code below linking Magritte-Roassal.
> Originally I had expected ":view" to hold aROView, and it was a surprise
> when I found out held aROMondrianViewBuilder instead. While it makes sense
> to have had a drop in replacement for the Magritte-Mondrian, and it is
> simple to get the ROView from the ROMondrianBuilder, it feels inelegant to
> have to do this each time.
> ---
> browser transmit
>    from: #pane1
>    to: #pane2
>    andShow:
>    [    :a |
>         a roassal
>             title: 'Instance Model Full View';
>             painting:
>            [     :view :selection  |  | rawView |
>                   rawView := view raw.
>                 ...etc...
>            ]
>    ].
>
> ---
> Looking in from outside and considering long term broadening use of Roassal
> outside of Mondrian, it would "feel" better if ...
>    andShow: [ :a | a roassal....
> passed aROView as a parameter to #painting, and the Mondrian drop-in
> replacement to be something like ...
>    andShow: [ :a | a roassalMondrian
>    andShow: [ :a | a roMondrian
>    andShow: [ :a | a mondrianBuilder
> which passed aROMondrianBuilder.
>
> cheers -ben
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--
www.tudorgirba.com

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

Re: Roassal-Magritte link semantics

abergel
In reply to this post by Ben Coman
> For a long time I have had the code below linking Magritte-Roassal.  Originally I had expected ":view" to hold aROView, and it was a surprise when I found out held aROMondrianViewBuilder instead.

It is true that we did not always do the distinction at the beginning of Roassal.
Now, we try to properly name 'rawView' an instance of ROView and 'view' an instance of the mondrian builder.

Cheers,
Alexandre

NB: I am now working on a way to have constraints (e.g., this label is always below this element). Pretty cool :-) I will commit today

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



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