From b3e0ec60dfbe7026e266a3ae63dda97de41762f4 Mon Sep 17 00:00:00 2001 From: Daniel Stolzenberg Date: Tue, 26 Oct 2010 13:53:21 +0200 Subject: [PATCH] fixed bug in "_modifierForKey()" where self was used in a plain JS-function --- Foundation/CPKeyValueCoding.j | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Foundation/CPKeyValueCoding.j b/Foundation/CPKeyValueCoding.j index 07ea71c87..e3bf2ce0f 100644 --- a/Foundation/CPKeyValueCoding.j +++ b/Foundation/CPKeyValueCoding.j @@ -76,7 +76,7 @@ var _modifierForKey = function(theClass, aKey) if (!CPObjectModifiersForClass) CPObjectModifiersForClass = [CPDictionary dictionary]; - var UID = [theClass.isa UID], + var UID = [theClass UID], selector = nil, modifiers = [CPObjectModifiersForClass objectForKey:UID]; @@ -96,8 +96,8 @@ var _modifierForKey = function(theClass, aKey) var capitalizedKey = aKey.charAt(0).toUpperCase() + aKey.substr(1) + ':'; - if ([self instancesRespondToSelector:selector = CPSelectorFromString("set" + capitalizedKey)] || - [self instancesRespondToSelector:selector = CPSelectorFromString("_set" + capitalizedKey)]) + if ([theClass instancesRespondToSelector:selector = CPSelectorFromString("set" + capitalizedKey)] || + [theClass instancesRespondToSelector:selector = CPSelectorFromString("_set" + capitalizedKey)]) { [modifiers setObject:selector forKey:aKey];