Thanks Alejandro,

Yes I went through the examples and I understood the difference between the 
examples using the builder (which are easier) and with pure Roassal, which 
are..let's say.. less user friendly..

I am trying, in pure Roassal, to do a tree map and add another node to the 
ROView then calling signalUpdate. No luck 'till now..

Cheers,
R

On Sep 20, 2013, at 3:01 PM, Alejandro Infante <[email protected]>
 wrote:

> Well,
> If you started with the Easel then you must have seen the examples. Well at 
> first you see two boxes with examples inside (one on the top and the other 
> below (If you dont see the second one just drag the view). 
> 
> The first one has a label at the top-left corner that says ROMondrianExample, 
> and this were done using the ROMondrianViewBuilder API, and you can see that 
> you interact mainly with the "view" variable.
> The second box is called ROExample and then you interact mainly with the 
> "rawView" variable which is pure Roassal.
> 
> The difference between them is that the ROMondrianViewBuilder is a nice and 
> friendly API, but doing really complex stuff it's not possible. So we go one 
> level below to pure Roassal.
> 
> Here you have the Collection class hierarchy in Roassal:
> |rawView|
>       rawView := ROView new.
>       Collection withAllSubclasses do: [ :c | 
>               | el |
>               el := ROBorder elementOn: c.
>               el @ ROPopup.
>               rawView add: el ].
> 
>       "Draw edges"
>       rawView addAll: (ROEdge 
>                               buildEdgesFromElements: rawView elements 
>                               from:  [ :cls | cls superclass ]  
>                               to: #yourself 
>                               using: ROLine new).
>                               
>       ROTreeLayout on: rawView elementsNotEdge edges: rawView elementsAsEdge.
>       rawView open.
> 
> I recommend you to see the ROExamples and if there is something that you 
> don't know just ask to the mailing list.
> You may like to see the ROExamples>>interactions>>addingOnClick example.
> 
> 
> 2013/9/20 [email protected] <[email protected]>
> Thanks Alejandro, I will try what you propose!
> 
> What do you mean by
> > Another thing bothering me is that you mentioned the method #nodes, thats 
> > from the ROMondrianViewBuilder, which I think is not that friendly with 
> > dynamic stuff.
> 
> How would you construct a view without using the ROMondrianViewBuilder? I am 
> used to start as in the Roassal Easel like
>         rawView := ROView new.
>         view := ROMondrianViewBuilder view: rawView
> 
> And then adding nodes to the view, calling view nodes: myNodes
> 
> Cheers,
> R
> 
> 
> 
> On Sep 20, 2013, at 1:49 PM, Alejandro Infante <[email protected]>
>  wrote:
> 
> > In Roassal calling the method #signalUpdate to the view should show those 
> > new nodes. If you want to re-layout the nodes you should apply a new layout 
> > to the nodes before the #signalUpdate.
> >
> > Another pretty interesting feature is the method ROContainer>>callback: 
> > aCallback. The idea is that every time an element is added inside the 
> > container the callback is called.
> > Now how you can use this:
> >
> > element callback: (ROContainerCallbackLayout new layout: (ROGridLayout new 
> > gapSize: 2)).
> >
> > Remember that you must send signalUpdate to the view if you want to see the 
> > changes.
> >
> > Another thing bothering me is that you mentioned the method #nodes, thats 
> > from the ROMondrianViewBuilder, which I think is not that friendly with 
> > dynamic stuff.
> > It is a little bit ugly but you can always get the ROView from 
> > ROMondrianViewBuilder sending the message #view and over that do all kind 
> > of Roassal magic stuff, like adding the callback with the TreeLayout the 
> > the ROView itself. Also for adding new nodes you should add them directly 
> > to the ROView, or at least I haven't found the way to do that without 
> > having to add all the nodes again to the Builder.
> >
> > Hope that help you.
> >
> >
> > 2013/9/20 [email protected] <[email protected]>
> > *and have the visualization re-layouted?
> >
> > On Sep 20, 2013, at 11:24 AM, "[email protected]" 
> > <[email protected]>
> >  wrote:
> >
> > > Hi,
> > >
> > > I was playing around with Roassal (in particular, a tree map) and I have 
> > > a question: Is there a way to dynamically adding nodes? I mean, once the 
> > > view is generated to update the #nodes by adding a new node (and 
> > > associations as well, i.e., edges) and have the visualization re-
> > >
> > > Thanks in advance.
> > >
> > > Roby
> >
> >
> >
> 
> 
> 


Reply via email to