How to call method by variable?
ned at bike-nomad.com
Mon Jan 20 02:40:09 UTC 2003
On Saturday 18 January 2003 06:22 am, Ralf Bokelberg wrote:
> This surely has been answered already,
> but i couldn't find it, sorry.
> I want to call a method of an object,
> whose name is in a variable.
> The following script is not correct,
> but it shows (hopefully) my intention.
> Transcript show: 'meth 1 called'.
> Transcript show: 'meth 2 called'.
> actMeth _ meth1
> "I want to call the method which is in actMeth"
> self actMeth.
> How can this be done ?
actMeth _ #meth1
self perform: actMeth
GPG key ID: BEEA7EFE
More information about the Squeak-dev