Storing and Retrieving Point
Richard A. O'Keefe
ok at atlas.otago.ac.nz
Fri Sep 28 01:21:56 UTC 2001
"Ken G. Brown" <kbrown at tnc.com> wrote:
I'm having trouble storing and retrieving Points.
...
pt _ Point new.
...
dict at: 'first' put: #('text' pt).
You are not having any trouble with points. Think of "#" as being
like Lisp's "quote". This is exactly equivalent to
(setf (gethash "first" dict) (QUOTE #("text" pt)))
In Smalltalk terms: #(...) is an array literal, in which everything
inside the () is implicitly quoted as if there were a # in front of
every element.
What you want is
dict at: 'first' put: {'text'. pt}
More information about the Squeak-dev
mailing list
|