Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: support for dates (CPDatePicker) in CPPredicateEditor #2054

Merged
merged 1 commit into from
Feb 11, 2014

Conversation

cacaodev
Copy link
Contributor

Before this commit, row templates and views belonging 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

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 cappuccino#2041
@cacaodev
Copy link
Contributor Author

There are still some visual issues with CPDatePicker inside a CPRuleEditor but they are not regressions:

  • textfield vertical centering inside rows is off, not only date pickers text fields.
  • The default row height in CPRuleEditor makes the stepper cropped.

@Dogild
Copy link
Member

Dogild commented Jan 17, 2014

Cool :)

Why did you create a CPDatePicker's category instead of adding the method in CPDatePicker.j ?

@cacaodev
Copy link
Contributor Author

Because in cocoa NSDatePicker (and NSControl in general) are not NSCopying compliant by default. It's an exception for CPPredicateEditor because CPDatePicker is embedded in it as the default UI for dates.

primalmotion added a commit that referenced this pull request Feb 11, 2014
Fixed: support for dates (CPDatePicker) in CPPredicateEditor
@primalmotion primalmotion merged commit 4531b01 into cappuccino:master Feb 11, 2014
@primalmotion
Copy link
Member

+#fixed

Thanks!

@cappbot
Copy link

cappbot commented Feb 11, 2014

Milestone: Someday. Label: #fixed. What's next? This issue is considered successfully resolved.

@cacaodev cacaodev deleted the CPPredicateEditor-dates branch February 21, 2014 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CPPredicateEditor fails when used with dates
4 participants