Thanks for answering, but thats what I alrready knew from Squeak By Example. What I mean is:<br>I want to create object (lets call it Container) that contains e.g. 3 buttons (remembering that any morph could 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 thing (with Container and 3 buttons) possible?<br>
<br><div class="gmail_quote">2009/1/15 K. K. Subramaniam <span dir="ltr">&lt;<a href="mailto:subbukk@gmail.com">subbukk@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Thursday 15 Jan 2009 12:03:03 am Filip Malczak wrote:<br>
&gt; Propably I got it all wrong, so if anyone can explain me how to create<br>
&gt; button and give a special action for clicking (any button, not only red)<br>
&gt; from code level, I&#39;d be VERY pleased.<br>
</div>Any morph can act as a button. Just add a method &quot;handlesMouseUp:&quot; to return<br>
true based on the event passed as argument and handle the event in mouseUp:<br>
method. See the section &quot;Adding Interaction&quot; in<br>
<br>
<a href="http://stephane.ducasse.free.fr/FreeBooks/CollectiveNBlueBook/morphic.final.pdf" target="_blank">http://stephane.ducasse.free.fr/FreeBooks/CollectiveNBlueBook/morphic.final.pdf</a><br>
<br>
HTH .. Subbu<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Pozdrawiam:<br>Filip<br>GG: 2486889<br>mail: <a href="mailto:filet00@gmail.com">filet00@gmail.com</a><br>