Thank you, but I don't think that using first shape's callback is working right if I edit second shape's extent.
Consider this example:
|s view e encompass block| s := RTCompositeShape new. s add: (RTBox new color: Color blue; size: 50). s add: (RTEllipse new color: Color green; size: 100). s horizontal. s setAutomaticRelayout. e := s element. view := RTView new. view add: e. e @ RTDraggable. encompass := RTBox new color: Color transparent; borderColor: Color red; element. view add: encompass. block := [ encompass extent: e encompassingRectangle extent; translateTo: e position. view signalUpdate. ]. e addCallback: (TRExtentCallback block: block); addCallback: (TRTranslationCallback block: block). block value. e when: TRMouseClick do: [ :ev | e trachelShape shapes second extent: 20@20. view signalUpdate. ]. view open
When I, on mouse click, edit first shape, encompassing box changes fine, but not like this, when I edit second shape.
Jan
abergel wrote
Hi Jan!
Composite shapes is a difficult beast to play with. You have found a bug, and I have just fixed it. Please update Roassal and Trachel, and you will obtain the expected behavior.
Cheers, Alexandre
On Mar 22, 2015, at 6:22 PM, Jan B. <
bliznjan@.cvut
> wrote:
Hello
Sice I am still playing with composite shapes, I found another problem, in addition to incorrect behavior of calling update onto it. This time I found that composite shapes do not send callbacks in lots of cases. Example:
| compo ellipse | compo := ((RTBox new size: 50; color: Color red; yourself) + RTBox new) element. compo @ RTDraggable. ellipse := RTEllipse new size: 20; color: Color blue; element. TRConstraint stick: ellipse below: compo. (RTView new) add: compo; add: ellipse; open.
When I drag the composite shape, ellipse does not move, although it should.
Jan
-- View this message in context: http://forum.world.st/Roassal-TRCompositeShape-not-sending-callbacks-tp48142... Sent from the Moose mailing list archive at Nabble.com. _______________________________________________ Moose-dev mailing list
Moose-dev@.unibe
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list
Moose-dev@.unibe
-- View this message in context: http://forum.world.st/Roassal-TRCompositeShape-not-sending-callbacks-tp48142... Sent from the Moose mailing list archive at Nabble.com.