question - blocks
haldane
haldane at pop3.poptel.org.uk
Sun Jul 21 15:09:35 UTC 2002
can anyone help
how do you get around this problem. I've simplified it to try and make it
more clear but basically:
|temp|
temp := (1 to: 100) collect: [:i| Nothing message: [i]].
where message: aBlock, is an instance creation message sent to some class
Nothing,
The problem is that I end up with a whole lot of instances of Nothing which
all still contain the i, and to make maters worse, the value of i for all
instances is its last value, ie in this case 100.
How can I force the i inside the [] to the number it represents.????????
Hope this makes sence!
More information about the Squeak-dev
mailing list
|