doesNotUnderstand: method missing

Sometimes the VM error message “#doesNotUnderstand: method missing” appears.

This wording is a bit misleading, because there are no methods “missing”. A more precise wording would be “#doesNotUnderstand: method could not be found”.

If an object does not implement a sent selector, the VM sends the “#doesNotUnderstand:” selector to the object. To find the compiled method to invoke, the VM does a search in the method dictionaries of the corresponding object. If the implementation of #doesNotUnderstand: cannot be found, the VM displays a message box with “#doesNotUnderstand: method missing”.

If this message appears, the method dictionary array (MDA) of the affected object must be invalid. An easy way to create this error is to replace the regular MDA with a nil or an empty array and send any selector to this object.