Re: [etoys-dev] Droppable Behaviors in Etoys

"K. K. Subramaniam" <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.squeakland
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.