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

John Hinsley jhinsley at telinco.co.uk
Mon Oct 22 00:29:53 UTC 2001


Karl Ramberg wrote:
> 
> John,
> 
> here is one way of doing this:
> 
> I will here use the show and hide messages instead of delete.
> 
> Open a morph, fx a rectangle morph.
> 
> Open the WorldTimeMorph and embed it into the rectangle.
> 
> Embed two buttons into the rectangle as well, and change their
> labels to 'dial anyway' and 'cancel'.
> 
> So
> 
> Add a instance variable to your rolodex that holds the local time.
> 
> then to each of the dial work / home etc button scripts
> add a ifTrue/ifFalse widget
> 
> then first test if the local time equals persons timezone
> 
> ifTrue: dial as before.
> 
> ifFalse: Rectangle show.
> 
> and make scripts for the two buttons in the rectangle morph
> 
> the 'cancel' button should simply be a
> 
> Rectangle hide
> 
> and the 'dial anyway' a rectangle hide plus the dial script.
> 
> Hope this helps:-)

Thanks Karl, that's a clever way of doing it, but not quite what I was
looking for. (Mind you, it's actually very difficult to describe what
I'm looking for without either sending a series of images or some kind
of design structure, and the Rolodex is very much Gonzo coding: totally
unplanned, unstructured and driven by inspiration, happenstance and the
need for discovery and playfullness.;-)

Ned's line:

World allMorphsDo: [ :ea | (ea isKindOf: WorldTimeMorph) ifTrue: [ ea
delete ]]

Works a treat and it'll enable me to run everything from the dial...
buttons (I think). I'll let you know when I've re-written the tests!

Thanks again

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