[Newbies] RE: Beginners Digest, Vol 35, Issue 22
Michael van der Gulik
mikevdg at gmail.com
Tue Mar 31 21:07:51 UTC 2009
On 4/1/09, Ray Feliciano <ray.feliciano at hotmail.com> wrote:
> Hi there,
> New to Squeak and the mailing list. Just had a question was hoping someone
> could answer. I'm currently following the Laser Game Development Example by
> Stephen Wessels and have hit a road block. I'm using Squeak image
> Tutorial Link: http://squeak.preeminent.org/tut2007/html/
> Step I'm On: http://squeak.preeminent.org/tut2007/html/028.html
> I've gone back and checked to make sure I had all the code written the same
> way, in the same places (I didn't at first) but 4 sUnit tests wont pass for
> the MirrorCellTestCase. I get Error: only integers should be used as
> indices. Now, going through the debugger I notice the error happens when my
> MirrorCell "cell" hits the code: 'self exitSides at: #north put: #east.'
> I'm guessing this should be a number. Yet, since I'm new to Squeaking and
> trying to follow along, I don't want to mess anything up that may affect
> later portions of the tut. Any ideas, suggestions, comments?
No, it shouldn't be a number. I've just had a quick look at the
tutorial (never looked at it before).
I suspect "self exitSides" is returning "nil" rather than a Dictionary
like it should. When you call >>at:put: like you did on a nil, you get
the error you got. Personally, I think this is a bug in Squeak; the
error is very misleading.
Umm... the fix is obvious for an experienced Smalltalker but a little
non-trivial to walk through using email. Jump on IRC and ask me there:
More information about the Beginners