Hi Bryce,

Try the following with the last version:
-=-=-=-=-=-=-=-=-=-=-=-=
| view builder |
builder := MOFormsBuilder new.
builder column; fill.
builder row; fill.
builder x: 1 y: 1 add: (MORectangleShape new width: 30; height: 30;  
fillColor: Color lightBlue).
builder x: 1 y: 1 add: (MOLabelShape new text: [:t| t printString]).

view := MOViewRenderer new.
view shape: builder shape.
view interaction draggable.
view nodes: (1 to: 53).
view edgesFrom: [:each | each * 2].
view gridLayout.
view open.
-=-=-=-=-=-=-=-=-=-=-=-=

It should do what you expect. For some reason, the text: message sent  
to a MORectangleShape does not do the right job. I suspect something  
is weird in BalloonCanvas. I will dive into this.
The draggable message make node draggable. If you need some popup,  
simply send popupText: [:each | ... ]

Cheers,
Alexandre


On 7 Mar 2009, at 22:26, <[email protected]> <[email protected] 
 > wrote:

> Alexandre Bergel writes:
>> This is trivial to achieve. I will give a try this week end.
>
> The other thing I noticed is the following script produces a messed
> up display. I'm not sure if this is a bug or if I'm missing something.
>
>  |view|
>  view := MOViewRenderer new.
>  view shape: (MORectangleShape new width: 30; height: 30; text: [:t|  
> t model printString]).
>  view nodes: (1 to: 53).
>  view gridLayout.
>  view open.
>
> Without the text: attribute it produces a sensible drawing.
>
> The messed up drawing is:
>
> <mondrian.jpg>
>
> The examples all seem to work.
>
> Bryce_______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

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






_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to