Hi Jan,
Sorry for replying so late.
The problem you describe is apparently not a complex one. I have proposed a fix in the
last version of Trachel.
Let us know!
Cheers,
Alexandre
On Mar 24, 2015, at 9:03 PM, Jan B.
<bliznjan(a)fit.cvut.cz> wrote:
I hate to bring more and more problems, but, well, here it is...
This is probably more related to our discussion about callbacks, but this
one is easily shown in your example code. When you change initial string
from 'click to expand' to '' (empty string), it now has extent
0@something
and when you click on it, it tries to create extent callback from
0@something size, and divides by zero. It seems like a problem only of
composite shapes.
Jan
abergel wrote
Hi Jan!
The #setAutomaticRelayout method is made to relayout the composite shape,
as you have rightfully guessed. You were using labels, and it was buggy
actually. Update Roassal and Trachel and the following example should
illustrate what you are trying to obtain.
-=-=-=-=-=-=-=-=-=-=-=-=
s := RTCompositeShape new.
b1 := RTBox new color: Color green.
b2 := RTBox new color: Color blue; size: 20.
b3 := RTLabel new.
s add: b1.
s add: b2.
s add: b3.
s horizontal.
s setAutomaticRelayout.
e := s elementOn: 'click to expand'.
view := RTView new.
view add: e.
e @ RTDraggable.
e @ RTPopup.
e when: TRMouseClick do: [ :ev |
e trachelShape shapes second extent: 45 @ 45.
e trachelShape shapes third text: 'hello'.
view signalUpdate.
].
view open
-=-=-=-=-=-=-=-=-=-=-=-=
Keep doing!
Alexandre
--
View this message in context:
http://forum.world.st/Roassal-2-updating-CompositeShape-tp4813359p4814954.h…
Sent from the Moose mailing list archive at
Nabble.com.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.