Copyright 2004 by M. Uli Kusterer Fri, 29 Nov -1901 11:06:32 GMT Comments on article blog-lookup-tables-for-fun-and-profit at blog-lookup-tables-for-fun-and-profit Comments witness_dot_of_dot_teachtext_at_gmx_dot_net (M. Uli Kusterer) witness_dot_of_dot_teachtext_at_gmx_dot_net (M. Uli Kusterer) en-us Comment 1 by Jean-Daniel "SEL theCommand = NSSelectorFromString(caseCorrectedCommand);
if( theCommand == nil )"

I don't think it's possible for NSSelectorFromString to return nil, even with a typo in your dictionary (except maybe if an objc runtime error occured). Whatever the string is, the runtime should create a new selector, or return an existing one.

This is what the NSSelectorFromString ref says:

To make a selector, NSSelectorFromString passes a UTF-8 encoded character representation of aSelectorName to sel_registerName and returns the value returned by that function. Note, therefore, that if the selector does not exist it is registered and the newly-registered selector is returned.