[Pharo-project] Workspace Enhancement
stephane.ducasse at inria.fr
Tue Jan 20 04:17:05 EST 2009
why don't you use a "circular" array using atWrap
atWrap: index put: value
"Store value into the index'th element of the receiver. If index is
of bounds, let it wrap around from the end to the beginning until it
is in bounds. Answer value."
^ self at: index - 1 \\ self size + 1 put: value
On Jan 20, 2009, at 9:44 AM, Alexandre Bergel wrote:
>>>> Neat behaviour - I'll have to try it out (like, what happens when
>>>> you have 5 open workspaces - do they all have access to the same
>>>> list of history? Just something to try).
>>>> What about contents of workspace variables? Are those stored in
>>>> history as well?
>>> Actually, I seldom reuse variables across workspaces and have no
>>> than 2 or 3 workspace at the same time.
>>> What would be the ideal scenario for variables?
>>> Thanks for your words,
> The history for workspace contents has 5 slots. Slots are filled upon
> workspace deletion: when you close a workspace, its content is
> inserted in the history. Only the last 5 contents are remembered.
> Other are forgotten.
> It is easy to increase this limit although.
> Alexandre Bergel http://www.bergel.eu
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
More information about the Pharo-dev