https://forum.world.st/Roassal-TRCompositeShape-not-sending-callbacks-tp4814221p4820102.html
> On Apr 8, 2015, at 2:58 PM, Jan B. <
[hidden email]> wrote:
>
> Hi
>
> This method does what I want and it works just fine. Only problem is that we
> add callbacks to all shapes in one place the same way, but this requires
> exception for composite shapes.
>
> It seems composite shapes need different behavior with different usage of
> them. I thought about using replacable blocks for composite shapes actions
> like adding callbacks, resizing or moving composite shape, reaction to
> moving or resizing sub-shapes etc.
>
> I will try to unify discussion about composite shapes into "Roassal
> TRCompositeShape regression" thread started by Peter.
>
> Jan
>
>
> abergel wrote
>> Hi Jan,
>>
>> I have a solution for your problem (you need to update Roassal). Let’s see
>> whether it works for you.
>>
>> Here is an updated version of your script:
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> 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. ].
>>
>> “I have introduced #addCallbackToAllShapes:"
>> e trachelShape addCallbackToAllShapes: (TRExtentCallback block: block).
>> e trachelShape addCallbackToAllShapes: (TRTranslationCallback block:
>> block).
>> block value.
>>
>> e when: TRMouseClick do: [ :ev |
>> e trachelShape shapes second extent: 20@20.
>> view signalUpdate.
>> ].
>>
>> view open
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>
>> Let us know about your progresses!
>>
>> Alexandre
>
>
>
>
>
> --
> View this message in context:
http://forum.world.st/Roassal-TRCompositeShape-not-sending-callbacks-tp4814221p4818427.html> Sent from the Moose mailing list archive at Nabble.com.
>
> _______________________________________________
> Moose-dev mailing list
>
[hidden email]
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.