Task

Invoke an object method where the name of the method to be invoked can be generated at run time.



Related tasks

 Respond to an unknown method call.
 Runtime evaluation


Object subclass: #Example.
 
Example extend [
  foo: x [
    ^ 42 + x ] ].
 
symbol := 'foo:' asSymbol. " same as symbol := #foo: "
 
Example new perform: symbol with: 5. " returns 47 "