Custom DND Drop Action?

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

Custom DND Drop Action?

Sean P. DeNigris
Administrator
How do I accept a dropped Morph, but do something other than the default add-as-submorph? I want to drop a Morph into a TextMorph and have it be automatically converted into a TextAnchor, but instead it becomes a submorph and takes over all available space so the contents of the TextMorph can not be changed. Thanks.
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Custom DND Drop Action?

Sean P. DeNigris
Administrator
Never mind. I found #handleDropMorph:, which I missed the first time because it is not in the dropping/grabbing protocol, but is instead in events-processing. Maybe it should be moved?
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Custom DND Drop Action?

Peter Uhnak

On Wed, Feb 4, 2015 at 5:53 PM, Sean P. DeNigris <[hidden email]> wrote:
Never mind. I found #handleDropMorph:, which I missed the first time because
Thanks! You saved me a search. :)
 
it is not in the dropping/grabbing protocol, but is instead in
events-processing. Maybe it should be moved?
This is maybe a broader question (I personally struggle with it quite a bit)... since at least from my naive view it should belong to both (and protocols don't work like tags).

Peter
Reply | Threaded
Open this post in threaded view
|

Re: Custom DND Drop Action?

Sean P. DeNigris
Administrator
Peter Uhnák wrote
at least from my naive view it should belong to both (and
protocols don't work like tags).
I agree. Maybe that will be Pharo's next fun enhancement!
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Custom DND Drop Action?

Sean P. DeNigris
Administrator
In reply to this post by Sean P. DeNigris
Sean P. DeNigris wrote
Maybe it should be moved?
Ouch! #acceptDroppingMorph:event: was the message I really wanted, but it was in the 'layout' protocol! That's just mean ;)
Cheers,
Sean