fix style issues in CPTextField and CPKeyValueBindingTest

This commit is contained in:
Klaas Pieter Annema
2010-09-23 10:35:41 +02:00
parent 71f8d1db74
commit 2fba03dc75
2 changed files with 11 additions and 11 deletions
+8 -8
View File
@@ -279,7 +279,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
_isEditable = shouldBeEditable;
if(shouldBeEditable)
if (shouldBeEditable)
_isSelectable = YES;
// We only allow first responder status if the field is editable and enabled.
@@ -695,8 +695,8 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
- (void)textDidBlur:(CPNotification)note
{
//this looks to prevent false propagation of notifications for other objects
if([note object] != self)
// this looks to prevent false propagation of notifications for other objects
if ([note object] != self)
return;
[[CPNotificationCenter defaultCenter] postNotification:note];
@@ -704,8 +704,8 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
- (void)textDidFocus:(CPNotification)note
{
//this looks to prevent false propagation of notifications for other objects
if([note object] != self)
// this looks to prevent false propagation of notifications for other objects
if ([note object] != self)
return;
[[CPNotificationCenter defaultCenter] postNotification:note];
@@ -757,7 +757,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
Sets a placeholder string for the receiver. The placeholder is displayed until editing begins,
and after editing ends, if the text field has an empty string value
*/
-(void)setPlaceholderString:(CPString)aStringValue
- (void)setPlaceholderString:(CPString)aStringValue
{
if (_placeholderString === aStringValue)
return;
@@ -881,7 +881,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
newValue = [stringValue stringByReplacingCharactersInRange:selectedRange withString:pasteString];
[self setStringValue:newValue];
[self setSelectedRange:CPMakeRange(selectedRange.location+pasteString.length, 0)];
[self setSelectedRange:CPMakeRange(selectedRange.location + pasteString.length, 0)];
}
}
@@ -1158,7 +1158,7 @@ var secureStringForString = function(aString)
if (!aString)
return "";
return Array(aString.length+1).join(CPSecureTextFieldCharacter);
return Array(aString.length + 1).join(CPSecureTextFieldCharacter);
}
+3 -3
View File
@@ -39,7 +39,7 @@
[binder setCheese:@"banana"];
[self assertTrue:[self valueForKey:@"FOO"]==="banana" message:"Bound value should have been updated to banana, was "+FOO];
[self assertTrue:[self valueForKey:@"FOO"] === "banana" message:"Bound value should have been updated to banana, was " + FOO];
}
- (void)testBindOptions
@@ -164,7 +164,7 @@
[tableColumn bind:@"value" toObject:arrayController withKeyPath:@"arrangedObjects.valueA" options:nil];
// Reset these if they were read during initialization.
for(var i=0; i<[content count];i++)
for (var i = 0; i < [content count]; i++)
[content[i] setAccesses:0];
var testView = [DataViewTester new];
[tableColumn prepareDataView:testView forRow:0];
@@ -242,7 +242,7 @@
CPNumber accesses @accessors;
}
+ (AccessCounter) counterWithValueA:aValue valueB:anotherValue
+ (AccessCounter)counterWithValueA:aValue valueB:anotherValue
{
r = [self new];
[r setValueA:aValue];