Spec & Roassal?

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

Spec & Roassal?

MartinW
=Seems one has to resubscribe to the new mailing-lists? sorry if this comes as a duplicate=

Hi,
how can i combine a Roassal visualization and a Spec UI?
Is there already some Roassal-Spec?
See attached screenshot for what i am trying to get.
M.


Reply | Threaded
Open this post in threaded view
|

Re: Spec & Roassal?

Benjamin Van Ryseghem (Pharo)
You have two solutions:
- write a spec model for roassal
- if presume that Roassal ends up as a Morph or something close. In spec you can embed a morph for free

Ben

On May 30, 2013, at 11:45 AM, MartinW <[hidden email]> wrote:

=Seems one has to resubscribe to the new mailing-lists? sorry if this comes
as a duplicate=

Hi,
how can i combine a Roassal visualization and a Spec UI?
Is there already some Roassal-Spec?
See attached screenshot for what i am trying to get.
M.

<http://forum.world.st/file/n4690746/GraphAndList.jpeg>




--
View this message in context: http://forum.world.st/Spec-Roassal-tp4690746.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Spec & Roassal?

MartinW
Benjamin Van Ryseghem-2 wrote
You have two solutions:
        - write a spec model for roassal
        - if presume that Roassal ends up as a Morph or something close. In spec you can embed a morph for free

> how can i combine a Roassal visualization and a Spec UI?
The snippet below generates the desired UI in Glamour (See also Screenshot). If you have time to take a look at it, what of the two solutions you suggested would be the preferable to get there using Spec? And - where would i learn how to do it?

This does the desired UI in Glamour:

|collection composer|
collection := OrderedCollection new.
collection add: #A; add: #B; add: #C; add: #D.

composer := GLMCompositePresentation new.
composer tabulator with: [ :t |
        t row: #visualization; row: #details.
        t transmit to: #visualization; andShow: [ :a |
                a stackedArrangement.
                a roassal
                        title: 'Visualization';
                        painting: [ :view :viewCollection |
                                view shape rectangle size: 30.
                                view nodes: viewCollection.
                                view shape arrowedLine.
                                view
                                        edges: ((OrderedCollection new) add: (#A->#B); add: (#A->#C); add: (#C->#D); yourself)
                                        from: #key
                                        to: #value.
                                        view treeLayout ].
                a list
                        title: 'List'.].
        t transmit from: #visualization; to: #details; andShow: [ :a |
                a text
                        title: 'Details';
                        display: [ :number | number asString ]] ].
composer openOn: collection

Reply | Threaded
Open this post in threaded view
|

Re: Spec & Roassal?

Benjamin Van Ryseghem (Pharo)
Spec acts at a lower level, so you will need more code for this result (I am working on that, but it will not be here before a couple of month)
If you want to embedded Roassal in spec, just wrap it in a morph, it's easier for you :)

To learn how to do it, you can find some documentation here: https://pharo.fogbugz.com/default.asp?spec.5.5.2

Ben

On Jun 9, 2013, at 10:46 PM, MartinW <[hidden email]> wrote:

Benjamin Van Ryseghem-2 wrote
You have two solutions:
- write a spec model for roassal
- if presume that Roassal ends up as a Morph or something close. In spec
you can embed a morph for free

how can i combine a Roassal visualization and a Spec UI?

The snippet below generates the desired UI in Glamour (See also Screenshot).
If you have time to take a look at it, what of the two solutions you
suggested would be the preferable to get there using Spec? And - where would
i learn how to do it?

This does the desired UI in Glamour:

|collection composer|
collection := OrderedCollection new.
collection add: #A; add: #B; add: #C; add: #D.

composer := GLMCompositePresentation new.
composer tabulator with: [ :t |
       t row: #visualization; row: #details.
       t transmit to: #visualization; andShow: [ :a |
               a stackedArrangement.
               a roassal
                       title: 'Visualization';
                       painting: [ :view :viewCollection |
                               view shape rectangle size: 30.
                               view nodes: viewCollection.
                               view shape arrowedLine.
                               view
                                       edges: ((OrderedCollection new) add:
(#A->#B); add: (#A->#C); add: (#C->#D); yourself)
                                       from: #key
                                       to: #value.
                                       view treeLayout ].
               a list
                       title: 'List'.].
       t transmit from: #visualization; to: #details; andShow: [ :a |
               a text
                       title: 'Details';
                       display: [ :number | number asString ]] ].
composer openOn: collection

<http://forum.world.st/file/n4692515/Glamorous.png>



--
View this message in context: http://forum.world.st/Spec-Roassal-tp4690746p4692515.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.