[Newbies] The Dictionary in a Workspace

Bert Freudenberg bert at impara.de
Fri Jul 14 09:18:49 UTC 2006

Am 14.07.2006 um 01:59 schrieb Mike O'Brien:

> 	I remember in early version of ST80, a Workspace was a
> _tabula rasa_ for each doIt.  Evaluating code left no trace.
> Then someone stuck in a hack whereby each Workspace maintained
> a Dictionary of variables that had been declared between
> vertical lines in a code swatch executed via doIt, so that
> you could then use those variables in later doIts and they
> would already be defined, with the objects assigned to
> them still hanging around via the Dictionary.
> 	I see that in Squeak, workspaces have Dictionaries,
> and sure enough, a variable I declared in a doIt does show
> up there, but it never seems to have a persistent value.
> What's with that?  What's that Dictionary doing, if not
> hanging onto the values of my temporary variables?

Actually, that works fine, but you must not declare your variables  
(using | var |). If you do, these are pure temporaries.

- Bert -

More information about the Beginners mailing list