While trying to understand SnakeGame I found interesting thing, but Im not sure how does it exactly work.<br><br>Does ButtonMorph #actionSelector: aSymbol gives a method to do when red-clicking? I mean:<br>
<br>SimpleButtonMorph new label: &#39;Label&#39;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;color: Color lightGray;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;borderColor: #raised;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;borderWidth: 2;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;actionSelector: #delete;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;target: self);<br>

<br>will after clicking send message #delete to self? So when e.g. I
give actionSelector: #openWindow; target: SuperMorph , I mean that
after clicking this message openWindow will be sent to SuperMorph? (I
give just an example, not real code)<br>
<br>So what about blue and yellow buttons? How to handle them from code-level?<br><br>I understand that I must have #aSymbol, #delete or #openWindow declared. But for what class? This, in which method I use upper code (when I create SimpleButton) or targets class?<br clear="all">
<br>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&#39;d be VERY pleased.<br><br>-- <br>Greeting<br>Filip<br>
GG: 2486889<br>mail: <a href="mailto:filet00@gmail.com">filet00@gmail.com</a><br>