creating a launcher morph

Ned Konz ned at bike-nomad.com
Sun May 6 01:42:11 UTC 2001


On Saturday 05 May 2001 16:36, Aron Brener wrote:
> Hi everybody. I hope someone can help me or point me in the right
> direction. I need to make a simple launcher, just a couple of buttons. One
> would create an instance of a class and thew others send some messages to
> the instance.
> (Actually in one case I need to get some input from the user, just a
> number. I'm assuming there's an easy way to do that, but i'm not
> there yet)
>
> I was looking at a tutorial on how to create a traffic light, and it
> got me only so far. Right now I have a subclass of Aligment morph
> with a couple of BasicButtons, but that's it.
> Should I be subclassing the basic buttons? How trap the button down
> event from one of the buttons and send a message to my AlignmentMorph
> subclass?

If you want a fully-working version, you can look at my latest Connectors 
stuff on Bob's Super Swiki. I have a ButtonBar and a MakerButton class. The 
MakerButton just duplicates Morphs that are dropped on it; when you push the 
button it duplicates its prototype and sends a user-specifiable message to it.
By default it just opens the Morph in the hand, but you can send any other 
single message to the new Morph.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com





More information about the Squeak-dev mailing list