Still trying to kill that pesky morph......

John Hinsley jhinsley at telinco.co.uk
Sun Oct 21 05:34:46 UTC 2001


Andreas Raab wrote:
> 
> John,
> 
> > Any ideas welcomed: I'd have thought this would be easy, but
> > it seems to be neither easy nor documented!
> 
> How about simply giving your morph a name (CMD-click on it and rename it to
> 'Foo') and then:
>         worldTime := World submorphNamed:'Foo'.
> 
> [BTW, it might be helpful to explain the scenario in which you need this
> reference - reading your message I couldn't figure out at all why I would
> want to have a textual reference if you don't want to have people using the
> UI after all]

Ah, well ;-)

here goes:

All this is in the context of the infamous Morphic Rolodex. The scenario
is that that the Rolodex itself has left the "confines" of Squeak and
become what Lex calls a distributable -- a VM and a radically chopped
down image. (This is a good way off, but something to aim at, if only
because it might give people the chance to see what Squeak is capable of
so they might like to try "real" Squeak themselves.) In such an image
we'd probably want to nail down a lot of the halos and stuff.

So, essentially the scenario is that someone clicks on one of the "dial"
buttons. As now, a dialogue box pops up asking if they want to dial the
number. But in the revised scenario, if they click "yes" then a block of
code checks to see if the Country entry on that page is the same as the
one they've hard coded as theirs. If not, it pops up Karl's
WorldTimeMorph with a further dialogue box. Something like "This person
lives in a different time zone! Do you still want to dial?" On clicking
yes, the morph is deleted and the number dialled, on clicking no, the
morph is deleted. Now, although a sort of hybrid functionality is
possible, it seems neater, since we're calling the Morph from a block of
code, to delete it from a block of code, too. 

(Of course, using Karl's morph isn't the only way it could be done, but
it is the prettiest, and as he wrote some code for me to initialize it
locally -- rather than via the Internet -- I feel duty bound to try and
use it.)

Cheers

John
-- 
If you don't care about your data, like file systems which automagically
destroy themselves and have money to burn on 3rd party tools to keep
your
system staggering on, Microsoft (tm) have the Operating System for you.




More information about the Squeak-dev mailing list