Newbie Questions

Ned Konz ned at bike-nomad.com
Fri Jul 4 14:15:27 UTC 2003


On Friday 04 July 2003 05:46 am, Jeff Longland wrote:
> I'm a new Squeak user and I'm not trying to tackle anything too
> difficult at the moment, or at least I didn't think so initially. 
> I'm working on creating an object (a snake) that will travel along
> the edge of a rectangle while leaving a trail.  As the snake works
> around the rectangle and comes back to its starting point, the
> snake will view the existing trail as the new wall - making smaller
> and smaller rectangles, until the snake has covered the surface
> area of the rectangle.  Ideally, I'd like to be able to move the
> snake object into any shape and it will cover the surface area in
> the same manner as the above mentioned rectangle.  I've been using
> penDown to create a pen trail behind the snake, but my major
> problem is that the sensor on my object is unable to view the pen
> trail.  

Hi Jeff,

Are you using the eToys scripting system? Or are you writing Smalltalk 
code directly?

The reason I ask is that the penDown stuff (and the rest of the turtle 
trails) is not often used outside of eToys. It could be, of course, 
but I've just never seen it.

Anyway, if you're using eToys you'll want to join the Squeakland 
mailing list (www.squeakland.org).

If not, well... the turtle trails are drawn on a separate Form that 
the World holds on to.

At least in 3.5/3.6a the turtle trails are invisible to colorAt: and 
color:sees:.

However, I believe (though I'm not certain) that the turtle trails 
have been made "see"able in the Squeakland image, sometime recently.

> I've searched around quite a bit and I've seen mention of
> transparent playfields, adjusting the display depth, and a method
> that refreshes the playfield - but Squeak documentation seems to be
> somewhat scattered.  I've been playing with Squeak for a while now,
> and I'm slowly getting the hang of everything - but it's taken
> quite a while.  Does anyone have any suggestions on how I can make
> the pen trails visible to my sensor?  Or any other suggestions for
> the project and my journey through Squeak?

I could write a method like PasteUpMorph>>colorAt: that would take the 
turtle trails into account.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list