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

diegogomezdeck at consultar.com diegogomezdeck at consultar.com
Thu Aug 21 09:02:19 UTC 2003


Thank you Karl, It rocks!

I got surprised when I saw the first (in my eyes) recursive eToys scripts.
I don't know if recursion is a topic to teach kids but for us (old vicious
programmers) it's funny.

Thanks again,

Diego

> diegogomezdeck at consultar.com wrote:
>>
>> 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:
>>
>>    lookForGarbage
>>       self walkAround. "walk randomly over the world"
>>       (self morphUnder = World)
>>          ifTrue:[
>>             self morphUnder owner: self.
>>             self pauseScript: #lookForGarbage.
>>             self startScript: #carryTheGarbageToASafePlace].
>>
>> I hope this time I explained my needs better than before.
>>
> I put a project at:
> http://209.143.91.36/super/uploads/HitAnyMorph.001.pr
>
> Karl





More information about the Squeak-dev mailing list