World Morph (was: Comments on Lex's "Object as Capabilities in Squeak")

Anthony Hannan ajh18 at cornell.edu
Thu Jan 30 18:11:55 UTC 2003


Hi Mark,

"Mark S. Miller" <markm at caplet.com> wrote:
> At 02:51 AM 1/30/2003 Thursday, cg at cdegroot.com wrote:
> >Every object that wants to do something with the UI needs to go directly
> >or indirectly to World.
> 
> When would an object do this without being passed or holding some other ui 
> object that gives it context? A button doesn't draw on the screen, it draws 
> within some containing thing, etc, recursively. At least this is how it 
> works in every ui toolkit I'm familiar with (including AWT, Swing, SWT). 
> Could you give an example that I could understand without learning Morphic?
> Thanks.

World is the top Morph in the tree of morphs that automatically gets
displayed and refreshed on the Screen.  A button would have a parent
morph, such as a window; the window would have a parent morph, such as
the World.  You add a morph by creating it with all its submorphs, then
adding it to the world.  For example: "World addMorph: (SystemWindow new
addMorph: (RectangleMorph new position: 100 at 100))" (go ahead execute
it).

Cheers,
Anthony



More information about the Squeak-dev mailing list