diff --git a/AppKit/CPKeyValueBinding.j b/AppKit/CPKeyValueBinding.j index e48f9fc22..db0b238da 100644 --- a/AppKit/CPKeyValueBinding.j +++ b/AppKit/CPKeyValueBinding.j @@ -345,12 +345,12 @@ var CPBindingOperationAnd = 0, [self _updatePlaceholdersWithOptions:options]; } -- (void)_placeholderForMarker:aMarker +- (JSObject)_placeholderForMarker:(id)aMarker { - var placeholder = _placeholderForMarker[aMarker]; + var placeholder = _placeholderForMarker[[aMarker UID]]; if (placeholder) - return placeholder['value']; + return placeholder.value; return nil; } @@ -359,14 +359,14 @@ var CPBindingOperationAnd = 0, { if (isDefault) { - var existingPlaceholder = _placeholderForMarker[aMarker]; + var existingPlaceholder = _placeholderForMarker[[aMarker UID]]; // Don't overwrite an explicitly set placeholder with a default. - if (existingPlaceholder && !existingPlaceholder['isDefault']) + if (existingPlaceholder && !existingPlaceholder.isDefault) return; } - _placeholderForMarker[aMarker] = { 'isDefault': isDefault, 'value': aPlaceholder }; + _placeholderForMarker[[aMarker UID]] = { 'isDefault': isDefault, 'value': aPlaceholder }; } @end @@ -802,6 +802,26 @@ var CPBindingOperationAnd = 0, @end +@implementation _CPStateMarker : CPObject +{ + CPString _name; +} + +- (id)initWithName:(CPString)aName +{ + if (self = [super init]) + _name = aName + + return self; +} + +- (CPString)description +{ + return "<" + _name + ">"; +} + +@end + // Keys in options dictionary @@ -811,10 +831,10 @@ CPObservedKeyPathKey = @"CPObservedKeyPathKey"; CPOptionsKey = @"CPOptionsKey"; // special markers -CPMultipleValuesMarker = @"CPMultipleValuesMarker"; -CPNoSelectionMarker = @"CPNoSelectionMarker"; -CPNotApplicableMarker = @"CPNotApplicableMarker"; -CPNullMarker = @"CPNullMarker"; +CPNoSelectionMarker = [[_CPStateMarker alloc] initWithName:@"NO SELECTION MARKER"]; +CPMultipleValuesMarker = [[_CPStateMarker alloc] initWithName:@"MULTIPLE VALUES MARKER"]; +CPNotApplicableMarker = [[_CPStateMarker alloc] initWithName:@"NOT APPLICABLE MARKER"]; +CPNullMarker = [[_CPStateMarker alloc] initWithName:@"NULL MARKER"]; // Binding name constants CPAlignmentBinding = @"alignment"; diff --git a/AppKit/CPRuleEditor/CPRuleEditor.j b/AppKit/CPRuleEditor/CPRuleEditor.j index 107e8c972..50e2905b8 100644 --- a/AppKit/CPRuleEditor/CPRuleEditor.j +++ b/AppKit/CPRuleEditor/CPRuleEditor.j @@ -1877,17 +1877,17 @@ TODO: implement - (CPString)_toolTipForAddCompoundRowButton { - return @"Add Compound row"; + return [_standardLocalizer localizedStringForString:@"Add compound row"]; } - (CPString)_toolTipForAddSimpleRowButton { - return @"Add row"; + return [_standardLocalizer localizedStringForString:@"Add row"]; } - (CPString)_toolTipForDeleteRowButton { - return @"Delete row"; + return [_standardLocalizer localizedStringForString:@"Delete row"]; } - (void)_updateSliceIndentations diff --git a/AppKit/CPView.j b/AppKit/CPView.j index 49e0e4aea..2827158ab 100644 --- a/AppKit/CPView.j +++ b/AppKit/CPView.j @@ -2557,7 +2557,7 @@ setBoundsOrigin: - (void)_setPreviousKeyView:(CPView)previous { - if ([previous isEqual:self]) + if ([previous isEqual:self] || ![[previous window] isEqual:[self window]]) _previousKeyView = nil; else _previousKeyView = previous; @@ -2565,7 +2565,7 @@ setBoundsOrigin: - (void)setNextKeyView:(CPView)next { - if ([next isEqual:self]) + if ([next isEqual:self] || ![[next window] isEqual:[self window]]) _nextKeyView = nil; else { diff --git a/Objective-J/Runtime.js b/Objective-J/Runtime.js index 5014fb2f8..7b1929384 100644 --- a/Objective-J/Runtime.js +++ b/Objective-J/Runtime.js @@ -400,7 +400,7 @@ GLOBAL(objj_allocateClassPair) = function(/*Class*/ superclass, /*String*/ aName // Give our current allocator all the instance variables of our super class' allocator. classObject.allocator.prototype = new superclass.allocator; - // "Inheret" parent properties. + // "Inherit" parent properties. classObject.ivar_dtable = classObject.ivar_store.prototype = new superclass.ivar_store; classObject.method_dtable = classObject.method_store.prototype = new superclass.method_store; diff --git a/Tools/Editors/Emacs/README.txt b/Tools/Editors/Emacs/README.txt index 2e4d9e506..0ae28549d 100644 --- a/Tools/Editors/Emacs/README.txt +++ b/Tools/Editors/Emacs/README.txt @@ -18,8 +18,7 @@ Installation Add objc-c-mode.el and objj-mode.el to your load path and require objj-mode. - (add-to-list 'load-path "/path/to/objc-c-mode.el") - (add-to-list 'load-path "/path/to/objj-mode.el") + (add-to-list 'load-path "/path/to/cappuccino/Tools/Editors/Emacs/") (require 'objj-mode) Other diff --git a/Tools/Editors/Emacs/objj-mode.el b/Tools/Editors/Emacs/objj-mode.el index 6ffea6da0..6a80cbd7e 100644 --- a/Tools/Editors/Emacs/objj-mode.el +++ b/Tools/Editors/Emacs/objj-mode.el @@ -5,8 +5,7 @@ ;;; To install, save this somewhere and add the following to your .emacs file: ;;; -;;; (add-to-list 'load-path "/path/to/objc-c-mode.el") -;;; (add-to-list 'load-path "/path/to/objj-mode.el") +;;; (add-to-list 'load-path "/path/to/cappuccino/Tools/Editors/Emacs/") ;;; (require 'objj-mode) ;;; ;;; Features: