Re: Why is compiler warning for +setKeys:triggerChangeNotificationsForDependentKey: ??
Re: Why is compiler warning for +setKeys:triggerChangeNotificationsForDependentKey: ??
- Subject: Re: Why is compiler warning for +setKeys:triggerChangeNotificationsForDependentKey: ??
- From: Markus Spoettl <email@hidden>
- Date: Tue, 20 Apr 2010 22:02:50 -0400
On Apr 20, 2010, at 9:48 PM, Steve Cronin wrote:
> Subclassed NSObject now getting compiler warnings - don't understand why?
>
> @interface ABC : NSObject {
> }
> @end
>
> @implementation ABC
> + (void)initialize
> {
> ...
> keys = [NSArray ..];
> [self setKeys:keys triggerChangeNotificationsForDependentKey:@"xyz"];
> ...
> }
> @end
>
> I'm seeing compiler warnings -> : warning: 'ABC' may not respond to '+setKeys:triggerChangeNotificationsForDependentKey:'
>
> What have I overlooked?
Not sure but any chance you target the iPhone? The 10.6 SDK header contains this:
#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE))
@interface NSObject(NSDeprecatedKeyValueObservingCustomization)
+ (void)setKeys:(NSArray *)keys triggerChangeNotificationsForDependentKey:(NSString *)dependentKey DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER;
@end
#endif
Note you should use alternatives since 10.5, see docs for more information:
<http://developer.apple.com/Mac/library/documentation/Cocoa/Reference/Foundation/Protocols/NSKeyValueObserving_Protocol/DeprecationAppendix/AppendixADeprecatedAPI.html>
Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden