When initializing a CPArrayController with a value that is not an array setContent: would make it an array by replacing value with [value]. This is consistent with how Cocoa does it, but it should first check to make sure that the content is not nil. If it is, the sensible thing to do (and what Cocoa does) is to replace it with an empty array.
This commit also includes a missing import to make CPArrayControllerTest run without error.
Parsing: fixed typos in built-in function names, fixed support for [FIRST], [LAST], [INDEX]
Fixed aggregates {exp1,exp2}
Fixed -expressionForFunction:selectorName:arguments:
built-in functions are now class methods
Cleaned a lot of code in built-in functions
EvaluatedObjectExpression is now a singleton
Merged inserset/minus/union Set into one file
Deleted unused expression subclasses : expression_operator and expression_assignement
Added CPCoding methods and changed key names to match Cocoa
Made KeyPathExpresion a subclass of FunctionExpression like in Cocoa
Tests
CPComparisonPredicate: fixed typo in 'between' operator evaluation, simplified 'contains' and 'in' evaluation.
Added tests in CPPredicateTest for theses fixes.
Note: this replaces the previous non Cocoa behaviour where the token field would grow height-wise with new tokens. This behaviour can still be useful, as seen in Apple Mail, but it will now require the user to subclass CPTokenField, override layoutSubview and set the frame size to the size of the scroll view's document view.
When clipping a range (i.e. some or all of it went below the lower bound) as a result of
calling shiftIndexesStartingAtIndex:by: with a negative delta, the CPIndexSet did not adjust
the index count, which caused calls to -lastIndex to fail.
This caused -[CPArrayController removeObject:] to fail when the object removed was at index 0.
- Fixed _minimumFrameSize to take into account bezel and line break mode.
- Added test to show how sizeToFit was broken for multi-line labels in the old code.
- Added test to verify that behavior is correct for single-line labels.
During the "normal" callback for new and old values, the ofObject:
parameter passed to the observer is the original receiver of the
addObserver:forKeyPath:options:context: call, but that isn't the case
with the call caused by the CPKeyValueObservingOptionInitial option.
This commit uses _targetObject, the receiver of the addObserver:...
call, rather than self, the _CPKVOProxy.
CPKeyValueBinding will sent _setCurrentValueIsPlaceholder: to indicate to an object that current value is a placeholder and should be displayed as such. This commit implements the method for CPTextField and adds a unit test to test the behavior.
Copying previous constants
Removing unnecessary constants
Borrowing initialization from my old implementation.
Refactoring the initialization method and adding setBackgroundColor: override.
Removing +initialize (no theming support yet) and -viewDidMoveToWindow (not sure why this was there?)
Implement the bulk of the new CPTabView
Adding delegate selectors. Don't think this is complete, though. What about when a user clicks on a segmented tab control?!
Adding delegate
Think I may have fixed the delegate blocking for selected segment control items
Adding tests. Fixing a bug by reverting to old way. Delegates still broken.
Cleaning up the test.
Resolving delegate issues (thanks Saikat!).
Switching tab appearance based on type enum. Updating tests to slightly test this.
Conflicts:
AppKit/CPTabView2.j
- Current theme blend is available via CPApplication -themeBlend.
- List of themes is available via CPApplication -themes.
- CPThemeBlend adds the following methods:
themes
themeNames
- CPTheme adds a number of methods to access theme attributes:
classNames
attributesForClass:
attributeNamesForClass:
attributeWithName:forClass: (was _attributeWithName:forClass:)
valueForAttributeWithName:forClass
valueForAttributeWithName:inState:forClass:
- _CPThemeAttribute -values was added to access the dictionary of attribute values.
- Theme browser application that demonstrates the API.
- In the course of making the test app, added the function CGInsetEqualToInset().
- The default box background color is now clear, that is what Cocoa does.
- Bezel drawing uses CPDrawTiledRects, obeys border width.
- CPDrawTiledRects/CPDrawColorTiledRects explicitly sets the line width and saves/restores the graphics state.
- Whitespace cleanup in CPBox.