A stupid newbie question
Dan Ingalls
Dan at SqueakLand.org
Sat Oct 6 19:40:45 UTC 2001
Hi, Patrick. There's now such thing as a stupid newbie question...
>The idea is to prompt the user for a simple point on a 3x3 grid meaning:
>answer isKindOf: Point.
>But when implementing..
>
>
>|aPoint|
>
>aPoint := FillInTheBlank
> request: 'Next move?'
> initialAnswer: '1 at 1'.
>
Try
aPoint := Scanner new scanTokens: aPoint
This should give you an array with <number> #@ <number>, which you can then check for validity. A more powerful thing to do is Compiler evaluate: <string>, but this will more easily cause errors.
Hope this helps
- Dan
More information about the Squeak-dev
mailing list
|