Merge branch 'archive-formatter'

This commit is contained in:
Aparajita Fishman committed 2012-07-09 21:31:09 -07:00
commit 4df0b7c940
5 files changed
+34 -13

No files matched your search

-1
View File
@@ -672,7 +672,6 @@ var CPComboBoxTextSubview = @"text",
if (_completes)
{
console.log("%d: %s", [theEvent keyCode], [theEvent _couldBeKeyEquivalent]);
if (![theEvent _couldBeKeyEquivalent] && [theEvent characters].charAt(0) !== CPDeleteCharacter)
{
var value = [self _inputElement].value,
+13 -9
View File
@@ -867,15 +867,14 @@ var CPControlBlackColor = [CPColor blackColor];
@end
var CPControlValueKey = "CPControlValueKey",
CPControlControlStateKey = @"CPControlControlStateKey",
CPControlIsEnabledKey = "CPControlIsEnabledKey",
CPControlTargetKey = "CPControlTargetKey",
CPControlActionKey = "CPControlActionKey",
CPControlSendActionOnKey = "CPControlSendActionOnKey",
CPControlSendsActionOnEndEditingKey = "CPControlSendsActionOnEndEditingKey",
var CPControlValueKey = @"CPControlValueKey",
CPControlControlStateKey = @"CPControlControlStateKey",
CPControlIsEnabledKey = @"CPControlIsEnabledKey",
CPControlTargetKey = @"CPControlTargetKey",
CPControlActionKey = @"CPControlActionKey",
CPControlSendActionOnKey = @"CPControlSendActionOnKey",
CPControlFormatterKey = @"CPControlFormatterKey",
CPControlSendsActionOnEndEditingKey = @"CPControlSendsActionOnEndEditingKey",
__Deprecated__CPImageViewImageKey = @"CPImageViewImageKey";
@@ -900,6 +899,8 @@ var CPControlValueKey = "CPControlValueKey",
[self sendActionOn:[aCoder decodeIntForKey:CPControlSendActionOnKey]];
[self setSendsActionOnEndEditing:[aCoder decodeBoolForKey:CPControlSendsActionOnEndEditingKey]];
[self setFormatter:[aCoder decodeObjectForKey:CPControlFormatterKey]];
}
return self;
@@ -929,6 +930,9 @@ var CPControlValueKey = "CPControlValueKey",
[aCoder encodeObject:_action forKey:CPControlActionKey];
[aCoder encodeInt:_sendActionOn forKey:CPControlSendActionOnKey];
if (_formatter !== nil)
[aCoder encodeObject:_formatter forKey:CPControlFormatterKey];
}
@end
+8
View File
@@ -578,6 +578,14 @@ var ListColumnIdentifier = @"1";
return YES;
}
break;
case CPCarriageReturnCharacter:
if ([self isVisible])
{
               [self closeListAfterItemClick];
return YES;
}
break;
}
return NO;
+5 -3
View File
@@ -518,9 +518,8 @@
for (; index !== stop; index += increment)
{
var range = _ranges[index];
var rangeIndex,
var range = _ranges[index],
rangeIndex,
rangeStop,
rangeIncrement;
@@ -630,6 +629,7 @@
}
}
}
return CPNotFound;
}
@@ -657,6 +657,7 @@
}
var indexesPassingTest = [CPMutableIndexSet indexSet];
for (; index !== stop; index += increment)
{
var range = _ranges[index],
@@ -689,6 +690,7 @@
}
}
}
return indexesPassingTest;
}
+8
View File
@@ -550,6 +550,7 @@ function descriptionWithoutEntity(aString)
{
return anIndex % 2 === 0;
}];
[self assertTrue:index === CPNotFound message:"must be equal to CPNotFound, was " + index];
[set0 addIndexesInRange:CPMakeRange(1, 10)];
@@ -557,12 +558,14 @@ function descriptionWithoutEntity(aString)
{
return anIndex % 2 === 0;
}];
[self assertTrue:index === 2 message:"index must be equal to 2"];
index = [set0 indexPassingTest:function(anIndex)
{
return anIndex === 1000;
}];
[self assertTrue:index === CPNotFound message:"must be equal to CPNotFound, was " + index];
}
@@ -587,6 +590,7 @@ function descriptionWithoutEntity(aString)
{
return anIndex % 2 === 0;
}];
[self assertTrue:[indexes isEqualToIndexSet:set1] message:"must be equal to " + [set1 description] + ", was " + [indexes description]];
}
@@ -598,6 +602,7 @@ function descriptionWithoutEntity(aString)
{
return anIndex % 2 === 0;
}];
[self assertTrue:index === 10 message:"index must be equal to 10"];
}
@@ -612,6 +617,7 @@ function descriptionWithoutEntity(aString)
visitedIndexes.push(anIndex);
return anIndex % 2 === 0;
}];
[set1 addIndex:2];
[set1 addIndex:4];
@@ -628,6 +634,7 @@ function descriptionWithoutEntity(aString)
{
return anIndex % 2 === 0;
}];
[self assertTrue:index === 6 message:"index must be equal to 6"];
}
@@ -643,6 +650,7 @@ function descriptionWithoutEntity(aString)
visitedIndexes.push(anIndex);
return anIndex % 2 === 0;
}];
[set1 addIndex:4];
[self assertTrue:[indexes isEqualToIndexSet:set1] message:"must be equal to " + [set1 description] + ", was " + [indexes description]];