While trying to understand SnakeGame I found interesting thing, but Im not sure how does it exactly work.

Does ButtonMorph #actionSelector: aSymbol gives a method to do when red-clicking? I mean:

SimpleButtonMorph new label: 'Label';
             color: Color lightGray;
             borderColor: #raised;
             borderWidth: 2;
             actionSelector: #delete;
             target: self);

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)

So what about blue and yellow buttons? How to handle them from code-level?

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?

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.

--
Greeting
Filip
GG: 2486889
mail: filet00@gmail.com