[etoys-dev] Droppable Behaviors in Etoys

K. K. Subramaniam kksubbu.ml at gmail.com
Thu Feb 9 10:32:27 EST 2012


On Thursday 09 Feb 2012 7:07:17 AM Steve Thomas wrote:
> I am looking to create droppable behaviors similar to those in Lively
> 
> Kernal.  I can do it with connectors like this:
> > script1
> > self getDestinationPlayer setColor: self getSourcePlayer getColor
> 
> But would like to simply drop a morph onto another morph to accomplish the
> task.  How can I get a list of morphs my "droppable behavior" is
> overlapping?
You can use Morph>>morphAt:behind:unlocked: method to get a list of morphs 
that lie below a morph at the given position.

The embed menu op uses this to extract a list of morphs. See 
Morph>>potentialEmbeddingTargets and its callers for examples.

HTH .. Subbu


More information about the etoys-dev mailing list