Skip navigation.
 
mlRe: warning: 'NSEntityDescription' may not respond to
FROM : Ben Trumbull
DATE : Fri May 30 23:49:30 2008

>  The compiler only knows about methods declared somewhere or the
>  headers, and Core Data accessor methods are handled at runtime and
>  not declared anywhere.  It's only a warning and not an error because
>  the compiler is smart enough to know that Objective C can do cool
>  stuff like that.
>  One solution is to use [managedObject valueForKey:@"memo"] and
>  [managedObject setValue:@"test123" forKey:@"memo"] instead of the
>  accessors.
>


Malcolm is right.  The dynamic properties are much much more
efficient than KVC (which is, as its name implies, by *key* i.e.
string based lookups, not native ObjC methods)

Use @interface to suppress the compiler warnings.

The dynamic properties are also more efficient than adding your own
KVC accessor methods, so don't add accessor methods that perform the
default behavior.  Use custom accessor methods for adding custom
logic.
--

-Ben

Related mailsAuthorDate
mlwarning: 'NSEntityDescription' may not respond to Steven Hamilton May 30, 11:17
mlRe: warning: 'NSEntityDescription' may not respond to Peter Burtis May 30, 12:09
mlRe: warning: 'NSEntityDescription' may not respond to Kyle Sluder May 30, 15:35
mlRe: warning: 'NSEntityDescription' may not respond to Fritz Anderson May 30, 20:16
mlRe: warning: 'NSEntityDescription' may not respond to mmalc crawford May 30, 20:51
mlRe: warning: 'NSEntityDescription' may not respond to Steven Hamilton May 30, 23:40
mlRe: warning: 'NSEntityDescription' may not respond to Ben Trumbull May 30, 23:49
mlRe: warning: 'NSEntityDescription' may not respond to Chris Hanson May 31, 10:13