diff --git a/AppKit/CPTextField.j b/AppKit/CPTextField.j index cf5ec9465..3afc353b1 100644 --- a/AppKit/CPTextField.j +++ b/AppKit/CPTextField.j @@ -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); } diff --git a/Tests/AppKit/CPKeyValueBindingTest.j b/Tests/AppKit/CPKeyValueBindingTest.j index f9fe62368..5face5a7a 100644 --- a/Tests/AppKit/CPKeyValueBindingTest.j +++ b/Tests/AppKit/CPKeyValueBindingTest.j @@ -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];