Respond to an unknown method call: Difference between revisions

Line 1,261:
 
new test {
anyMethodThatDoesNotExist() # Define and call the new method
anyMethodThatDoesNotExist() # Call the new method
}
Line 1,269 ⟶ 1,270:
? "You are calling a method that doesn't exist!"
aError = Split(cCatchError," ")
cMethodName = aError[len(aError)]
? "The Method Name: " + cMethodName
AddMethod(self,cMethodName,func {
? "Hello from the new method!"
})
? "We defined the new method!"
call cMethodName()
ok
</lang>
Line 1,277 ⟶ 1,283:
You are calling a method that doesn't exist!
The Method Name: anymethodthatdoesnotexist
We defined the new method!
Hello from the new method!
Hello from the new method!
</pre>
 
2,468

edits