It might seem obvious to me now, especially with that uppercase "K" in "Key", but all my keys start with a lowercase letter, not uppercase (in keeping with Apple style guidelines), and the KVO Protocol Reference documentation does not call out the uppercase letter requirement. This particular warning is buried within the KVO Programming Guide, instead.
Good:
+ (NSSet *)keyPathsForValuesAffectingAmountInOtherCurrency { return [NSSet setWithObjects: @"dollarsToConvert", @"exchangeRate", nil]; }
Bad:
+ (NSSet *)keyPathsForValuesAffectingamountInOtherCurrency { return [NSSet setWithObjects: @"dollarsToConvert", @"exchangeRate", nil]; }
Yes, the bad version even looks bad, so I guess I should have figured that out faster.
No comments:
Post a Comment