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

Karl Ramberg karl.ramberg at chello.se
Sun Oct 21 09:14:10 UTC 2001


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:-)

Karl




More information about the Squeak-dev mailing list