[Newbies] Parse an argument for a symbol that requires one
Marcus Strehlow
marcus.strehlow at gmail.com
Mon Mar 3 20:51:44 UTC 2008
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
More information about the Beginners
mailing list