Send an unknown method call: Difference between revisions

Content added Content deleted
Line 130:
^ 42 + x ] ].
 
namesymbol := 'foo:' asSymbol. " same as namesymbol := #foo: "
 
Example new perform: namesymbol with: 5. " returns 47 "</lang>
 
The <code>perform:with:with:</code> family of methods exist for methods with 0 - 2 (3 in GNU Smalltalk) arguments. For methods with more arguments, use <code>perform:withArguments:</code>, which takes an array of arguments.