How to I get one Morph to call another?

Dan Shafer dshafer at yahoo.com
Tue Apr 17 05:21:47 UTC 2001


Generic answer. I haven't looked at the specific issue you raise, but in
general, you get Morphs to talk to each other by having an action on one invoke
a script that is either associated with another Morph or addresses it. The
tutorial I wrote on how to do a Counter project entirely by direct manipulation
in Morphic shows you how to use a mouse action in a Morph to cause a change in
another Morph and I suspect the fundamental mechanism is pretty much the same
from one of these to another.

So assuming there's a script in Celeste's Mister Postman Morph that expects to
do what you want, you should be able to invoke that script from a mouse action
in a TextMorph.

Others with vastly more experience will undoubtedly weigh in with more accurate
and precise information, but maybe this will be enough to get you started.

If you want to look at my tutorial, it's at
http://minnow.cc.gatech.edu/squeak/1827.

--- John Hinsley <jhinsley at telinco.co.uk> wrote:
> Something tells me I'm going about this the wrong way, but:
> 
> I've a page morph which contains several text morphs. What I want is a
> mouse up event on one of the text morphs to call Mister Postman (the
> message bit of Celeste) with the e mail address in that text morph in
> the to: field.
> 
> I'm not 100% sure that that would work: maybe I need some intermediate
> dialogue "Do you want to compose an email to the owner of this
> address?".
> 
> But essentially I've no idea whatsoever how to do this. I've looked at
> tempCommands and this doesn't seem the way to go. 
> 
> And a nagging little voice is telling me that I really ought to create
> new instances and work on them.
> 
> Aaargh!
> 
> Any clues gratefully recieved.
> 
> Thanks
> 
> John 
> -- 
>
******************************************************************************
> Marx: "Why do Anarchists only drink herbal tea?"
> Proudhon: "Because all proper tea is theft."
>
******************************************************************************
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/





More information about the Squeak-dev mailing list