Storing and Retrieving Point

Bob Arning arning at charm.net
Thu Sep 27 21:03:56 UTC 2001


Ken,

The literal array syntax "#()" only handles literals - symbols, strings, numbers, characters. Thus it interprets pt as #pt. Either

	dict at: 'first' put: {'text'. pt}.

or 

	dict at: 'first' put: (Array with: 'text' with: pt).

will do what you want.

Cheers,
Bob


On Thu, 27 Sep 2001 14:08:53 -0600 "Ken G. Brown" <kbrown at tnc.com> wrote:
>I'm having trouble storing and retrieving Points. What am I doing wrong?
>
>pt _ Point new.
>pt _ 25 at 125. 
>dict _ Dictionary new.
>dict at: 'first' put: #('text' pt).
>readPt _ ((dict at: 'first') at: 2). "readPt is now a Symbol"





More information about the Squeak-dev mailing list