helene did you check on pharo by example because hilaire wrote something on 
morph drag and dropping a while ago and we used it.
I looked for my little example where I controlled a that a morph would on 
demand repel a drop or accept it.
I did not check it but here it is 
Let me know if it is working for you. first in 1.4 and if you can adapt it for 
your need.



 

Attachment: DragAndDropRepel.3.cs
Description: Binary data

On Aug 14, 2012, at 9:25 PM, Helene Bilbo wrote:

> I already asked this on Stackoverflow, but as there were no answers, I post
> the question also here:
> 
> I want to build a Morph that accepts the dropping of files and folders onto
> it and that answers a new FileSystem FileReference for them in Pharo 1.4.
> 
> I found the class ExternalDropHandler and the wantsDropFiles: anEvent method
> in Morph, but it don't know how to put it all together, especially as
> ExternalDropHandler seems to work still with the old Files file system.
> 
> *What I did so far:*
> I made a subclass of Morph and implemented wantsDroppedMorph: aMorph event:
> evt, wantsDropFiles: anEvent and dropFiles: anEvent and set enableDragNDrop:
> to True. I open an instance in World and bring the Morph to the front. But,
> whenever I drop a file or folder onto it, it's the World, instance of
> PasteUpMorph, that get's to handle the drop (I found out by putting in some
> self halts) and not my Morph.
> 
> 
> 
> --
> View this message in context: 
> http://forum.world.st/HowTo-make-a-Morph-that-accepts-dropped-files-and-folders-and-produces-a-new-FileSystem-FileReferenc4-tp4644119.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 

Reply via email to