Dropping Morphs on Roassal canvas

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Dropping Morphs on Roassal canvas

Peter Uhnak
Hi,

I've made a small addition to Roassal, so now we can drop morphs onto Roassal canvas and then do something with it.

For example open a view:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
v := RTView new.

v @ (RTMorphDropInteraction new
        if: [ :morph :event | morph isTransferable and: [ morph passenger isNotEmpty ] ]
        do: [ :morph :event | |el|
                el := (RTLabel new elementOn: morph passenger first).
                el @ RTDraggable.
                v add: el.
                v signalUpdate.
        ]).

v open.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And then drag Class or Method from Nautilus window and it should appear in the canvas.

The interaction can be added to any shape (not just view), and the first (in terms of elements placed on top of each other) shape/view that passes the #if: block will process it (just like a click event).

Is this useful in Roassal itself? Should I keep it for myself? (The implementation is a bit... hacky).

Peter
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Dropping Morphs on Roassal canvas

abergel
Hi Peter!

We will have a look at it very soon!

Alexandre


> On Feb 6, 2017, at 9:52 AM, Peter Uhnak <[hidden email]> wrote:
>
> Hi,
>
> I've made a small addition to Roassal, so now we can drop morphs onto Roassal canvas and then do something with it.
>
> For example open a view:
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> v := RTView new.
>
> v @ (RTMorphDropInteraction new
> if: [ :morph :event | morph isTransferable and: [ morph passenger isNotEmpty ] ]
> do: [ :morph :event | |el|
> el := (RTLabel new elementOn: morph passenger first).
> el @ RTDraggable.
> v add: el.
> v signalUpdate.
> ]).
>
> v open.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> And then drag Class or Method from Nautilus window and it should appear in the canvas.
>
> The interaction can be added to any shape (not just view), and the first (in terms of elements placed on top of each other) shape/view that passes the #if: block will process it (just like a click event).
>
> Is this useful in Roassal itself? Should I keep it for myself? (The implementation is a bit... hacky).
>
> Peter
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

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



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Dropping Morphs on Roassal canvas

Offray Vladimir Luna Cárdenas-2
Hi Peter,

Please don't keep it to your self. The first thing I think is in
mind-maping having interactive trees with morph (graphics, sound code
snippets) as nodes.

Cheers,

Offray


On 07/02/17 10:28, Alexandre Bergel wrote:

> Hi Peter!
>
> We will have a look at it very soon!
>
> Alexandre
>
>
>> On Feb 6, 2017, at 9:52 AM, Peter Uhnak <[hidden email]> wrote:
>>
>> Hi,
>>
>> I've made a small addition to Roassal, so now we can drop morphs onto Roassal canvas and then do something with it.
>>
>> For example open a view:
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> v := RTView new.
>>
>> v @ (RTMorphDropInteraction new
>> if: [ :morph :event | morph isTransferable and: [ morph passenger isNotEmpty ] ]
>> do: [ :morph :event | |el|
>> el := (RTLabel new elementOn: morph passenger first).
>> el @ RTDraggable.
>> v add: el.
>> v signalUpdate.
>> ]).
>>
>> v open.
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> And then drag Class or Method from Nautilus window and it should appear in the canvas.
>>
>> The interaction can be added to any shape (not just view), and the first (in terms of elements placed on top of each other) shape/view that passes the #if: block will process it (just like a click event).
>>
>> Is this useful in Roassal itself? Should I keep it for myself? (The implementation is a bit... hacky).
>>
>> Peter
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.list.inf.unibe.ch/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Dropping Morphs on Roassal canvas

Kjell Godo
sounds good

dropping Classes Methods is good

hacky?

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Dropping Morphs on Roassal canvas

Peter Uhnak
In reply to this post by Offray Vladimir Luna Cárdenas-2
On Tue, Feb 07, 2017 at 10:54:52AM -0500, Offray Vladimir Luna Cárdenas wrote:
> Hi Peter,
>
> Please don't keep it to your self. The first thing I think is in
> mind-maping having interactive trees with morph (graphics, sound
> code snippets) as nodes.

I wanted mindmap during my exams (mostly because no mindmaping software really supports math)...

but I think this is best left for Bloc.

Peter
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev