[Newbies] Passing methods to buttons

Filip Malczak filet00 at gmail.com
Thu Jan 15 19:24:33 UTC 2009


damn, I send message, then I read it and found several language mistakes. It
should go as quoted:

2009/1/15 Filip Malczak <filet00 at gmail.com>

> Thanks for answering, but thats what I already knew from Squeak By Example.
> What I mean is:
> I want to create object (lets call it Container) that contains e.g. 3
> buttons (remembering that any morph could act as one), each with different
> action. I dont want to create 3 subclasses of Button or SimpleButton and
> define #mouseDown: for them, but define some method for Container, that adds
> submorphs Button with exact actions for clicking. Can I do this with
> #actionSelector: and #target: ? How does it exactly work? And (it should be
> first question) - is this (with Container and 3 buttons) possible?
>
> 2009/1/15 K. K. Subramaniam <subbukk at gmail.com>
>
> On Thursday 15 Jan 2009 12:03:03 am Filip Malczak wrote:
>> > Propably I got it all wrong, so if anyone can explain me how to create
>> > button and give a special action for clicking (any button, not only red)
>> > from code level, I'd be VERY pleased.
>> Any morph can act as a button. Just add a method "handlesMouseUp:" to
>> return
>> true based on the event passed as argument and handle the event in
>> mouseUp:
>> method. See the section "Adding Interaction" in
>>
>>
>> http://stephane.ducasse.free.fr/FreeBooks/CollectiveNBlueBook/morphic.final.pdf
>>
>> HTH .. Subbu
>> _______________________________________________
>> Beginners mailing list
>> Beginners at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>>
>
>
>
> --
> Pozdrawiam:
>
> Filip
> GG: 2486889
> mail: filet00 at gmail.com
>



-- 
Pozdrawiam:
Filip
GG: 2486889
mail: filet00 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20090115/729b85ff/attachment.htm


More information about the Beginners mailing list