Respond to an unknown method call: Difference between revisions

Content deleted Content added
m →‎{{header|Tcl}}: corrected requirements
Line 161:
example.ding("dong"); // alerts "tried to handle unknown method ding"
// alerts "it had arguments: dong</lang>
 
=={{header|Lua}}==
<lang Lua>
local object={print=print}
setmetatable(object,{__index=function(t,k)return function() print("You called the method",k)end end})
object.print("Hi") -->Hi
object.hello() -->You called the method hello
</lang>
 
=={{header|Objective-C}}==