[Newbies] Dictionary>>at:put:

Levente Uzonyi leves at elte.hu
Fri Mar 11 22:14:31 UTC 2011

On Fri, 11 Mar 2011, Tim Johnson wrote:

> Hi,
> I'm digging into some code I haven't touched in at least a year.  I was surprised when something which used to work no longer works.  The image has moved from a PPC Mac to a Windows PC.  It is based on 3.10.2-7179.
> The error that appears to be happening is when I attempt to put something into a Dictionary at a key that doesn't exist, I'm getting an #errorKeyDoesNotExist instead of it just putting the thing into the dictionary at that (new) key.

Is it #errorKeyNotFound?

> Dictionary>>at:put: is clearly supposed to create a new key if one doesn't exist.

Right. Are you sure that it's #at:put: and not #at: followed by #put:, 
like here?

 	at: #foo;
 	put: #bar.


> OK, I just did a Quit->Save and started it back up again and the problem went away.  :/
> If anyone has any explanation, please share.  Otherwise since the problem is gone, you can happily ignore me :)
> Thanks,
> Tim
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

More information about the Beginners mailing list