[Squeakland] [Q] [eToys] Object under?

diegogomezdeck at consultar.com diegogomezdeck at consultar.com
Wed Aug 20 05:03:37 PDT 2003

Thanks John and Karl for the answers...

Reading my original email I realized I was not so clear in the question (
definitively I have to improve my English :-| ).

What I was looking for is a way to get a reference to *any* morph under.
The idea is to program a type of "garbage collector" that walk around the
world and take any morph on the world (the garbage) and carries it to
a "safe" place.

I mean something like this:

      self walkAround. "walk randomly over the world"
      (self morphUnder = World)
            self morphUnder owner: self.
            self pauseScript: #lookForGarbage.
            self startScript: #carryTheGarbageToASafePlace].

I hope this time I explained my needs better than before.



> Use the "overlaps" tile; a sample script, looked at in text mode, would
> look like this:
> script1
> 	self forward: 5.
> 	(self overlaps: Ellipse1)
> 			~~ false
> 		ifTrue: [self beep: 'coyote']
> Best,
> John
> -----Original Message-----
> From: squeakland-bounces at squeakland.org
> Sent: Tuesday, August 19, 2003 5:25 PM
> To: squeak-dev at lists.squeakfoundation.org
> Cc: squeakland at squeakland.org
> Subject: [Squeakland] [Q] [eToys] Object under?
> Hi,
> I'd like to get a reference to the morph under the given object.  The
> same idea behind color-under but with a reference to a morph instead to
> a color.
> Is it possible?
> TIA,
> Diego

More information about the Squeakland mailing list