Before this commit, row templates and views belo,ging to them were copied via archiving/unarchiving.
This was causing problems when the view was not completely CPCoding compliant, like for CPDatePicker.
With this commit, template views use CPCopying (-copy method) when available.
Also added CPCopying for CPDatePicker as a category in CPPredicateEditor.
Test: in CPPredicateEditorTest, on the right panel, choose a keypath, operator, and select 'Dates' in the popup for the right expression.
Fixes#2041
- Get the scroller orientation from the xib.
- Fix the nonsensical calculation of _isVertical when given bounds.
- Since orientation comes from the xib, had to re-nib2cib everything to be safe.
- Fixed case where no format strings are specified in xib (which ends up being an empty string).
- Fixed case where malformed strings file would not match regex.
- General cleanup.
SmartFoldersDemo: disable the size-to-fit like feature in the controller because 1/ CPPredicateEditor should have its own sizeToFit and 2/ It was shadowing other resizing bugs.
* date is (today, yesterday)
* date is less than [text field]
- CPPredicateEditorCibTest example: templates merging in the 'mixed' criterion.
- ojtest AppKit/CPPredicateEditorTest testing the merging feature.
- Cleaned and rearranged code related to the right control action method.
- re-enable tooltips.
- As per cocoa, the predicate is recomputed when you send the right control action, not when you change text. Update-as-you-type can be turned ON by subclassing -_sendsActionOnIncompleteTextChange method. Default is NO.
- Rewrote _reconfigureSubviews method, should be faster.
Fixed a bug when menu item titles and their corresponding keypath expressions where different and templates created in IB.
Fixed a bug appearing in Xcode4 IB when titles and keypath where identical.
Tests: CPRuleEditorCibTest, CPPredicateEditorCibTest, SmartFoldersDemo: a real world usage of CPPredicateEditor.
Documentation for these 3 new classes.