[Newbies] Is there an easy way to implement an animation loop?

2012-01-05 Thread Jan Teske
Hi there, I try to implement a blocking animation so that the process waits for the animation to be terminated before going ahead. This animation should lower the extent of a Morph in 20 iterations so that it looks like it would shrink. I tried to accomplish that in a '1 to: 20 do:' loop

[Newbies] Changing the extent of an ImageMorph

2012-01-04 Thread Jan Teske
Hey, I'm currently developing a small game with Squeak. Part of it is a bunch of menus which should have background images. Therefore I have realized them as ImageMorphs with the respective images. Now, there are menus which sizes are determined dynamically during the runtime of the game.

[Newbies] Iterating backwards through a Matrix

2011-12-22 Thread Jan Teske
I'm currently trying to develop a game with squeak. The game field is based on a Matrix in which all the game objects are placed. To simulate gravity I need the possibility to iterate over the Matrix in a reversed order. For example if my Matrix looks like that: 1 x x 2 x 3 x x 4 x

[Newbies] Implementing a simple timer

2011-12-15 Thread Jan Teske
I'm trying to write a simple timer using a TextMorph and its step method. It should count up every 1 second so I've set stepTime to 1000. My step method looks as follows: step self time: self time + 1. self contents: self time asString That should work. But I discover one

[Newbies] Deleting elements from a Collection while looping through it

2011-12-10 Thread Jan Teske
Hey, I have a question concerning the behavior of Collections in Squeak. Recently I face a problem when trying to delete some elements from a set during a 'do:' message. Have a look at this sample method: doFallForAllIn: aSet aSet do: [:block | block fall ifFalse: