My last post about this went "thud" :-) That's OK, I decided I'd just
try it for a while. After two days I have to say that the idea of
saving workspace contents to class-side methods is working pretty well
so I published WorkspaceAsMethod to squeaksource.
In Squeak 4.1 install with:
Installer ss
project: 'WorkspaceAsMethod';
install: 'WorkspaceAsMethod'
>From the Workspaces class documentation:
This class simplifies storing Workspace contents in class-side methods.
Right now there is no UI support so you have to do things manually.
Begin by creating a class to house your workspaces. Make it a subclass
of me. In this example I'll call it TmpWorkspaces:
Workspaces subclass: #TmpWorkspaces
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'WorkspacesDemo'
Now create a new workspace by evaluating:
TmpWorkspaces openNewWorkspaceSelector: #firstWorkspace label: 'First
Workspace'.
If you browse the TmpWorkspaces class you'll see a class-side method
called firstWorkspace. This is where your workspace contents will be
saved. Modify the workspace and 'accept' your changes. The class-side
method will be updated accordingly. You can close the Workspace without
fear of losing anything. To re-open it just:
TmpWorkspaces firstWorkspace
or
TmpWorkspaces open: #firstWorkspace
To open all workspaces just:
TmpWorkspaces openAll.
The #openAll method assumes that your workspaces are all in the method
category 'workspaces' so if you move them they won't be opened by this
selector.
David
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners