Formatting

This commit is contained in:
Aparajita Fishman committed 2013-02-11 23:08:08 -05:00
1 parent 12b2bd2c52
commit a622f5ca9b
2 files changed
+21 -9

No files matched your search

+5
View File
@@ -286,6 +286,7 @@ var CPBindingOperationAnd = 0,
var uid = [anObject UID],
objectSuppressions = _suppressedNotifications[uid];
if (!objectSuppressions)
_suppressedNotifications[uid] = objectSuppressions = {};
@@ -302,6 +303,7 @@ var CPBindingOperationAnd = 0,
var uid = [anObject UID],
objectSuppressions = _suppressedNotifications[uid];
if (!objectSuppressions)
return;
@@ -318,6 +320,7 @@ var CPBindingOperationAnd = 0,
optionName = CPBinderPlaceholderOptions[count],
isExplicit = [options containsKey:optionName],
placeholder = isExplicit ? [options objectForKey:optionName] : nil;
[self _setPlaceholder:placeholder forMarker:marker isDefault:!isExplicit];
}
}
@@ -330,8 +333,10 @@ var CPBindingOperationAnd = 0,
- (void)_placeholderForMarker:aMarker
{
var placeholder = _placeholderForMarker[aMarker];
if (placeholder)
return placeholder['value'];
return nil;
}
+16 -9
View File
@@ -33,8 +33,8 @@ CPUndefinedKeyException = @"CPUndefinedKeyException";
CPTargetObjectUserInfoKey = @"CPTargetObjectUserInfoKey";
CPUnknownUserInfoKey = @"CPUnknownUserInfoKey";
var CPObjectAccessorsForClassKey = @"$CPObjectAccessorsForClassKey",
CPObjectModifiersForClassKey = @"$CPObjectModifiersForClassKey";
var CPObjectAccessorsForClassKey = @"$CPObjectAccessorsForClassKey",
CPObjectModifiersForClassKey = @"$CPObjectModifiersForClassKey";
@implementation CPObject (CPKeyValueCoding)
@@ -107,13 +107,20 @@ var CPObjectAccessorsForClassKey = @"$CPObjectAccessorsForClassKey",
switch (accessor[0])
{
case 0: return objj_msgSend(self, accessor[1]);
// FIXME: We shouldn't be creating a new one every time.
case 1: return [[_CPKeyValueCodingArray alloc] initWithTarget:self key:aKey];
// FIXME: We shouldn't be creating a new one every time.
case 2: return [[_CPKeyValueCodingSet alloc] initWithTarget:self key:aKey];
case 3: if ([theClass accessInstanceVariablesDirectly])
return self[accessor[1]];
case 0:
return objj_msgSend(self, accessor[1]);
case 1:
// FIXME: We shouldn't be creating a new one every time.
return [[_CPKeyValueCodingArray alloc] initWithTarget:self key:aKey];
case 2:
// FIXME: We shouldn't be creating a new one every time.
return [[_CPKeyValueCodingSet alloc] initWithTarget:self key:aKey];
case 3:
if ([theClass accessInstanceVariablesDirectly])
return self[accessor[1]];
}
return [self valueForUndefinedKey:aKey];