Ok, thanks Doru
On 1 Apr 2009, at 12:20, Tudor Girba wrote:
Yes, it is the intended behavior, because the rule is that all
settings (shape, figure and interaction) get reset after a #nodes:
or #edges:from:to: command.
The reason is this.
If you add several nodes of the same type, in 99% of the cases you
will have them in one collection, and if you want them to behave the
same one #nodes: command and one set of settings is all you need. If
they are not in the same collection, then you can probably simply
construct a collection. If you want them to behave or appear
differently, then you want to have control over the settings for
If you add several nodes of different types, then you want to have
several #nodes commands. However, because there are several types
the settings that work for one set of nodes do not work for the
settings of another type.
Let's change your example a bit:
| view |
view := ViewRenderer new.
view interaction popupText: [:e | (e + 1) printString].
view node: 1.
view node: 'a'.
If you propagate the settings to the 'a' node, you will get an error
because String does not understand #+.
That is why we decided to have the settings reset after each
command. There are indeed a few cases when you will have to
duplicate some of your settings code, but the compromise is quite
On 1 Apr 2009, at 12:05, Alexandre Bergel wrote:
> Dear All,
> I was wondering what should be the correct behavior in Mondrian in
> VW. Consider the following scripts:
> | view |
> view := ViewRenderer new.
> view interaction popupText: [:e | 'first level'].
> view node: 1.
> view node: 2.
> view open
> the popup appears for the first node only. Is it really the
> intended behavior? I would expect the interaction object to be
> shared between nodes
> Alexandre Bergel http://www.bergel.eu
> Moose-dev mailing list
"It's not how it is, it is how we see it."
Moose-dev mailing list
Alexandre Bergel http://www.bergel.eu