Now I'm really confused :-(

david at aminal.com david at aminal.com
Wed Jul 17 01:25:23 UTC 2002


On Tue, Jul 16, 2002 at 02:41:43PM -0700, Ned Konz wrote:
> Hi David,
> 
> It can be confusing at times.
> 
> There's a few of ways that one Morph can address another.
> 
> You don't say how you're making your Morphs and wiring them to events; 
> there are at least three ways I can think of:
> 
> * Smalltalk programming in a Morph subclass

Smalltalk programming. See below.

> In the case of Smalltalk programming, there are a few ways to do it:
> 
> * Something can hold onto references to the other object. Generally 
> this is either one of the two objects, or something that made one or 
> both of them.
> 
> [Actually, messaging between loose Morphs (i.e. both in the World) is 
> relatively uncommon outside of the eToy system. By far most of the 
> Morph to Morph messages are between Morphs and their submorphs or 
> parents. (or between the Hand and another Morph, but I'm skipping 
> that for right now).]
> 
> There is a built-in relationship between Morphs and their parents, so 
> you could query the World for a submorphSuchThat: [...something ] . 
> But I don't recommend this.
> 
> * You can refer to Morphs by name, then ask their owner:
> 
> morph1 name: 'Morph1'.
> ...
> World morphNamed: 'Morph1'.
>

Yep, this is the namespace I was looking for, and stumbled
across in the FAQ.

OK, here's my strategy, which I'm going to try in the morning.

>From a workspace, I'll create Morphs ala

(RectangleMorph new name: 'r3') openInWorld

>From code inside a Morph, I send messages to other
Morphs thusly -

(World submorphNamed: 'r3') color: Color red. 


When I've got things the way I want, I'll dismiss the
workspace and any other tools I've got open, then
'lock down' the whole thing using the technique at

http://minnow.cc.gatech.edu/squeak/778

that refers to the disableProgrammerFacilities preference.

The end result I'm trying for is One Big Morph, the World
(a PasteUpMorph), with the only child windows being an occasional
modal dialog.


Thank you, thank you

David Schutt



 



More information about the Squeak-dev mailing list