Respond to an unknown method call: Difference between revisions

→‎{{header|Tcl}}: ++ smalltalk
(added slate language)
(→‎{{header|Tcl}}: ++ smalltalk)
Line 216:
slate[2]>
</lang>
 
=={{header|Smalltalk}}==
{{works with|GNU Smalltalk}}
 
<lang smalltalk>Object subclass: CatchThemAll [
foo [ 'foo received' displayNl ]
bar [ 'bar received' displayNl ]
doesNotUnderstand: aMessage [
"aMessage selector asString printNl."
('message "' , (aMessage selector asString) , '"') displayNl.
(aMessage arguments) do: [ :a |
'argument: ' display. a printNl.
]
]
]
 
|a| a := CatchThemAll new.
a foo.
a bar.
a weCanDoIt.
a theyCanToo: 'eat' and: 'walk'.</lang>
 
 
=={{header|Tcl}}==