Ah ok. Currently we cannot do that.
Is this urgent?
What are you trying to achieve? Improving the drag and drop support?
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Jun 18, 2014, at 11:21 AM, Gustavo Santos
gugajansen@gmail.com wrote:
> Yes, I was trying that (the second example). But, as I said, I only need the event to trigger when I leave the click, which ROMouseDragged did before. That's why Roassal have ROMouseDragging and ROMOuseDragged.
>
> On Wed, Jun 18, 2014 at 5:09 PM, Alexandre Bergel
alexandre.bergel@me.com wrote:
> Hi Gustavo,
>
> Here is the similar version in Roassal2:
> -=-=-=-=-=-=-=-=
> | v el |
> v := RTView new.
> el := (RTBox new size: 20) element.
> v add: el.
> el when: TRMouseDragging do: [ :evt | Transcript show: 'ok'; cr ].
> v open
> -=-=-=-=-=-=-=-=
>
> However, you cannot move the square. Since it is not draggable. So, you can have
>
> -=-=-=-=-=-=-=-=
> | v el |
> v := RTView new.
> el := (RTBox new size: 20) element.
> v add: el.
> el @ RTDraggable.
> el when: TRMouseDragging do: [ :evt | Transcript show: 'ok'; cr ].
> v open
> -=-=-=-=-=-=-=-=
>
> Your example a bit more fancy:
> -=-=-=-=-=-=-=-=
> | v el lbl |
> v := RTView new.
> el := (RTBox new size: 20) element.
> v add: el.
> el @ RTDraggable.
>
> lbl := RTLabel elementOn: 'Move the box!'.
> v add: lbl.
> lbl translateBy: 0 @ -50.
>
> el when: TRMouseDragging do: [ :evt | lbl trachelShape text: evt positionFromCamera asString. v signalUpdate ].
> v open.
> -=-=-=-=-=-=-=-=
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel
http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> On Jun 18, 2014, at 9:32 AM, Gustavo Santos
gugajansen@gmail.com wrote:
>
> > Hello everyone,
> >
> > I'm working on a small visualisation of packages and classes and basically I want to be able to drag and drop one class to other package
> >
> > In Roassal I could do this:
> >
> > | view el |
> > view := ROView new.
> > el := ROElement sprite.
> > view add: el.
> > el
> > on: ROMouseDragged
> > do: [ :event | Transcript show: 'ok'; cr ].
> > view open.
> >
> > But in Roassal 2 I only have TRMouseDragging (equivalent to ROMouseDragging in R1), that executes the block during the whole dragging operation. What's the alternative to MouseDragged in Roassal 2?
> >
> > Other question will come after that, but let's do baby steps.
> >
> > Cheers,
> >
> > --
> > Gustavo Santos
> > Université de Lille-1
> > _______________________________________________
> > Moose-dev mailing list
> > Moose-dev@iam.unibe.ch
> >
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> --
> Gustavo Santos
> Université de Lille-1
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev