Hi guys,
if you have a SimpleButtonMorph, you can decide what it should do and it's pretty easy. You say
self target: aTarget actionSelector: #someAction.
And it works. But what if not only an action should be executed, what if the actionSelector gets a symbol that requires an argument? In my case I need to change a variable first before further proceeding you see. So I am wondering if it is possible to do something like this:
self target: aTarget actionSelector: #someAction: argumentRequired
I have tried many ways, including constructing the action first in temporary variables and then just using that temp variable as actionSelector string. All my efforts have been in vain. There is a way to solve this for me, but it would be very tedious to do and would increase the code volume... and that's not what I want.
If you have any ideas on this, let me know.
Thanks, Marcus
"Marcus Strehlow" marcus.strehlow@gmail.com wrote in message news:1872F954-FB0E-4D1D-AA9C-85C27F2CAD09@gmail.com...
Hi guys,
self target: aTarget actionSelector: #someAction.
And it works. But what if not only an action should be executed, what if the actionSelector gets a symbol that requires an argument?
Marcus,
I was curious about this, so i went and got this to work: (notice the ':' in show:)
b := ScriptableButton new openInWorld. b target: Transcript. b actionSelector: #show:. b arguments: (Array with: 'test').
HTH -Jeroen
beginners@lists.squeakfoundation.org