[Newbies] A do with ONLY index? (plus,. a style question)
blake at kingdomrpg.com
Sun Feb 4 08:35:21 UTC 2007
On Sat, 03 Feb 2007 20:44:50 -0800, Todd Blanchard <tblanchard at mac.com>
> If you just want the index, you would do something like:
> 1 to: collection size do: [:i | "stuff goes here" ].
You know, I didn't consider that because it's...extrinsic.
> If you want to fill an entire collection with a single value, try
> collection atAllPut: #rock.
> I would probably do the grid class idea.
> Object subclass: #Grid
> instanceVariables: 'rows'.....
But not descend from Array?
More information about the Beginners