Accessing Morphs as objects

Lex Spoon lex at cc.gatech.edu
Wed Jun 5 16:15:29 UTC 2002


"Richard A. O'Keefe" <ok at cs.otago.ac.nz> wrote:
> Geza Lakner MD <geza67 at freestart.hu> wrote:
> 	If I make a "new morph..." by the menu, let's say a Playfield, embed
> 	a Textmorph in it via the menu, where can I find these two objects in
> 	the System Browser hierarchy?
> 
> You can't.  The System Browser shows *CLASSES*.

This is a deep issue.  One of the nicest things in Smalltalk is that you
interact with live objects *instead* of just looking at dead, skeletal
classes.  And yet, the primary tool most people use is focussed the
other way around.

There was a project to work on this very issue by Eric Gold and Mary
Beth Rosson.  It was named "Portia", and was written up in OOPSLA '91. 
(I dunno if there is any current code available -- I've only read about
it!)

Portia added a few neat bits of UI to help work with objects.  First,
inspectors and debuggers now had a "get" command for grabbing the object
(not class!) being viewed, and likewise a "put" command for pasting the
currently grabbed object into a different context.  Also, the class
browser could now have sample instances attached to classes as the
default instance to use with "self".  This added a connection between
browsers and the live system which sounds like it would be very smooth.

Reading this made me think that we can do even better with Morphic.  I
haven't tried it, but manipulating those menues really sounds a bit
clunky.  The get and put would seem better done with drag and drop.  The
workspace trick Squeak has now is just one example; another UI that
would be neat is to drag objects into inspectors to set fields, and to
drag objects out of inspectors to put them somewhere else.  (If
MorphicWrappers already does this, then kudos to them!  I still haven't
had a good chance to play with that system!)


> ---->	sample instance
> ---->	inspect instances
> ---->	inspect subinstances

Yes, these are nice to know about!  Now how would you put one of these
instances into a workspace to play with?  Well, one way would be to use
the drag-from-inspector trick described above....


Overall, it seems that a workspace could be even more of an assembly and
tinkering area than it is right now.  Currently, workspaces are mostly
involved with objects created in that very workspace.  But with just a
few little tricks, it looks like they could be used for objects all
across the system.

Lex



More information about the Squeak-dev mailing list