A Proposal for Project Layers

Dan Ingalls Dan.Ingalls at disney.com
Mon Nov 15 19:43:18 UTC 1999


Mark Guzdial <guzdial at cc.gatech.edu> wrote...
>I have a couple of questions about the Project Layers work -- please 
>excuse if they're too early in the process:
>
>(1) I decided to try again with externalizing a Wonderland in a 2.7a 
>image with all updates.
>
>First, I did in a workspace:
>w := Wonderland new.
>
>Then in the Wonderland, I loaded up my Favorite Generic Purple 
>Dinosaur, and moved him around (including spinning his head around 
>demonically a few times :-), then typed back in the original 
>workspace:
>
>(ImageSegment new copyFromRootsForExport: (Array with: w))
>		writeForExport: 'wonderland.extSeg'.
>
>I got an error "Trying to write out, AnObsoleteWonderlandActor2"  Is 
>the complete externalized segment system not in the update stream 
>yet, or am I using it incorrectly?

2.7a is up to date in this regard.  However Project swapping is the only place where we have tried to address every little detail.  It will take a while to duplicate your example and give you some guidance.

It is likely that we will only support imageSegments in two ways:
	1.  As currently for projects, extended to packages as well.
	2.  As ArchivalCollection, which would let you put a bunch of things in it,
	    tell it to go to disk, and or tell it to revert (possibly N versions), etc.
Then you would either use then mindlessly for projects or packages, or as part of a program or ad-hoc doit using ArchivalCollection.

>(2) Which leads into my second question: How will one associate 
>classes with an externalized segment?  If I create an Active Essay in 
>a Project, creating some new classes in the process, how do I get my 
>new classes to save out when I save out an externalized version of 
>the Package containing the Project?  My (limited) understanding of 
>the segmentation system is that it saves out the objects in the 
>project/package, but not necessarily the class definitions associated 
>with those objects -- is that correct?

Yes, and this is exactly what the new mechanism will change.  In the new world, a project archive will include the morphic world, as well as its associated (local layer of) global variable bindings.  These would include the class defs for your active essay, and also the actor classes used for scripting.  While I've been calling this a package (to remind myself what serious programmers will expect), you can see why I also like the term project layer:  it keeps everything local to the project so that the underlying system is not affected, and so that it can be peeled off again with no enduring side-effects, or shipped to another Squeak where it can be stuck on in an equally modular manner.

	- Dan





More information about the Squeak-dev mailing list