Commit Graph
39 Commits
Author SHA1 Message Date
Alexandre Wilhelm 1f983db47c Fixed: refactoring of the class _CPDatePickerTextField.j. We now use the method called by interpreteKeyEvents instead of handling the key equivalent in performKeyEquivalent 2015-06-29 14:28:28 -07:00
Marek Kresnicki 99df5fadbc Replaced confusing method _isEnglishFormat with _isAmericanFormat. Removed method was always true for US and GB locale while it shouldn't be. 2015-05-21 15:30:53 +01:00
Antoine Mercadal 05d602c313 Merge pull request #2279 from Dogild/CPDatePickerEnter
Fixed: CPDatePicker takes key code CPReturnKeyCode all the time
2014-12-09 18:11:38 -08:00
Antoine Mercadal e1d92bd630 Merge pull request #2265 from Dogild/FocusRingDatePicker
Fixed: CPDatePicker doesn't have a focusRing when editing
2014-12-09 17:42:59 -08:00
Alexandre Wilhelm 9174338140 Fixed: CPDatePicker takes key code CPReturnKeyCode all the time
Previously, the CPDatePicker took the key code CPReturnKeyCode all the time. It means, the key event wasn't redistributed to the other component, for example a defaultButton in a window.

Now instead of returning YES, it returns [super performKeyEquivalent:anEvent]
2014-12-09 17:26:02 -08:00
Alexandre Wilhelm 77f962eed4 Style: removed comment in CPDatePicker 2014-11-28 09:58:44 -08:00
Alexandre Wilhelm ad364b6184 Fixed: CPDatePicker doesn't have a focusRing when editing
Previously, the CPDatePicker didn't have a focus ring when an user was editing it.
Now it does. It works for Aristo1 and Aristo2.

Test App in Tests/Manual/CPDatePickerTest

Fixed #2263
2014-11-26 12:04:00 -08:00
Antoine Mercadal f9275a70af FIXED: New warnings reveleaded by ivar type checking
This patch fixes all new warnings
2014-11-06 10:17:05 -08:00
Alexandre Wilhelm 09e3c5ecfc New: possibility to drag in a textual CPDatePicker
Previously it wasn't possible to update the selected element of a textual CPDatePicker when dragging.
Now we can as in Cocoa.
2014-10-28 13:31:27 -07:00
Antoine Mercadal 43f7dcd08f Merge pull request #2204 from Dogild/CPDatePicker-CPTableView
Fixed: CPDatePicker in a CPTableView wrong behavior
2014-09-24 12:27:04 -07:00
Antoine Mercadal 71bfe4dd44 Merge pull request #2176 from Dogild/CPView-addSubview
Fixed: Methods viewDidMoveToSuperview viewDidMoveToWindow viewWillMoveToSuperview viewWillMoveToWindow not called as in Cocoa
2014-09-24 12:22:07 -07:00
Alexandre Wilhelm 83ec89fa20 Fixed: CPDatePicker send an action with the methods setObjectValue: and setDateValue:
Previously, the CPDatePicker sent an action to the target when the method setObjectValue: and setDateValue were called.
Now it sends the action only when the user makes an action.

Fixed #2206
2014-09-10 12:54:16 -07:00
Alexandre Wilhelm c1e89bd1c3 Fixed: CPDatePicker in a CPTableView wrong behavior
Previously, when clicking on a CPDatePicker in a CPTableView, cappuccino didn't select the tableView row firstly.
Now it does as in cocoa.
The stepper still have the same behavior as a CPButton in a CPTableView.

refs #2201
2014-09-05 16:16:46 -07:00
Alexandre Wilhelm aded1dd4da Merged: manual merged 2014-09-05 13:00:48 -07:00
Alexandre Wilhelm 1fcf13d149 Fixed: added optimization for releasing observers 2014-08-20 16:13:59 -07:00
Alexandre Wilhelm abdf1156d4 Fixed: memory leaks with CPNotifications
Previously, when removing a view, Cappuccino didn't clean the notification center. The notification center kept in reference old views.

This PR fix this issue. When a CPView is added to a view, the methods _removeObservers and _addObservers are called. In these both methods we remove and add the observer to the notification center if needed. _removeObservers and _addObservers are called for the view and its subviews. These both methods are called through the method viewWillMoveToSuperview.

When a CPView is removed, we only call the method _removeObservers.
When a CPWindow is closed, we call the method _removeObservers on its contentView.
When a CPWindow is about to be opened, we call the method _removeObservers and _addObservers on its contentView.

Refs #1880
Refs #2024

Test app in Tests/Manual/AttachedSheet2/SheetWindowController.j
2014-08-19 17:45:01 -07:00
Christophe Serafin c078bb04b2 Correction and optimizations based on Alex comments. Fix for CPDatePickerTest 2014-08-12 13:31:22 -07:00
Christophe Serafin 5feac3a7ff allow using regular, small and mini sizes from xCode and from code using setControlSize method. Available on CPTextField, CPStepper, CPDatePicker only for the moment 2014-08-05 17:34:58 -07:00
Alexandre Wilhelm 34072f3947 Fixed: stringValue is used instead of intValue 2014-06-24 16:53:31 -07:00
Alexandre Wilhelm bc9c78acfe Fixed: wrong comment 2014-06-24 10:03:26 -07:00
Alexandre Wilhelm 96b791b5f9 Fixed: fixed gangster's comment 2014-06-23 10:28:10 -07:00
Alexandre Wilhelm 717841877f Fixed: typo in _CPDatePickerTextField.j 2014-06-22 13:18:03 -07:00
Alexandre Wilhelm 972c14225b Fixed: CPDatePicker value is wrong when making a click on the stepper
Previously, when making a click on the stepper of a textual CPDatePicker, the intern value of the stepper wasn't updated with the correct value of the CPDatePicker. This occurred when the user changed the dateValue in the delegate methods of the textField.
2014-06-18 18:30:29 -07:00
Alexandre Wilhelm a83b9109bf Fixed: typo in CPDatePicker 2014-05-29 15:13:17 -07:00
Alexandre Wilhelm 089d564934 Fixed: CPDatePicker firstResponder issue
Previously, the textual datePicker didn't work because it couldn't become the firstResponder.
This PR fixed another issue as well. Previously it wasn't possible to modify a date when moving only with tab and when the datePicker came firstResponder with tabulation.
2014-05-27 10:12:02 -07:00
Alexandre Wilhelm 970b176fbf New: Graphical CPDatePicker clicking on the arrows with key mask Command/Control/Alternate
Now when clicking on the arrows with the key mask Command/Control or Alternate change the date to 1 year or 10 years as in Cocoa.
2014-03-20 15:57:25 -07:00
Alexandre Wilhelm 8147f648a1 Fixed: Textual CPDatePicker issue with number of digit
Previously, the day/month/hour of the textual datePicker had always two digits, even when the number was under 10. For instance the day 8 was displayed 08.
Now it's like in cocoa, 8 is displayed 8.

Fixes #2059
2014-02-07 16:36:05 -08:00
Alexandre Wilhelm ebccbf28a7 Fixed: issues with timeZone
This PR fixes several issues with the timeZone.
It also changes the way to "calculate" the date of the textual datePicker.
2014-01-14 15:12:10 -08:00
Alexandre Wilhelm 8b975f50dd Fixed : CPDatePicker textual issues
This PR fixes several issues about the textual CPDatePicker :
- Fixed the issue about keyView loop when not assigning the nextKeyView
- Changed the behavior of the component when editing or deleting the date. It works as in cocoa now.
- Fixed bug about frameSize of each component when editing
- Fixed bug about NaN or null values
- Added optimization
- Refactoring the code
2014-01-10 08:52:25 -08:00
Martin Carlberg bb58a206a8 Fixed: Removed all warnings of conflicting return and parameter types caused by the new compiler 2013-08-12 16:46:14 +02:00
Alexandre Wilhelm 14ab582a53 Fixed : Aristo showcase is broken because CPDatePicker
Previously the showcase of Aristo and Aristo2 didn't work because several bugs in the class CPDatePicker.

This PR fixes these problems :
- The first problem was when displaying a textual datePicker, the class tried to calculate different things for the calendar (good optimization as well).
- The second problem was about the calendar and the hands. It wasn't possible to display a PatternColor made with an image in a layer, now we use a PatternImage and the method CGContextDrawImage to draw the hands.
2013-05-21 13:53:16 -07:00
Antoine Mercadal 7fc7632971 Fixed: Crash after deployment when importing CPDatePicker
Previously, CPStepper was delcared using a @class. If CPStepper was not manually imported anywhere else in the app, it caused a crash.
This patch explicitely import CPStepper.j in _CPDatePickerTextField.j
2013-05-06 15:37:25 -07:00
Antoine Mercadal f8513eae26 Merge pull request #1903 from Dogild/CPDateFormatterSupport
New: Added support for CPTimeZone and CPDateFormatter
2013-05-06 13:11:36 -07:00
Alexandre Wilhelm bd2a7b2b7b Fixed: CPDatePicker freeze when hidden
Previously the CPDatePicker freezed when trying to hide it when it was the firstResponder.
There was an intern problem in the CPDatePickerTextField about the nextKeyView. That's why there was a boundless loop and the freeze.
This PR also fixed a big about the previous and next textField in the CPDatePicker.
It also fixed a bug about the CPDatePicker when it becomes firstResponder.

Fixes #1909
2013-04-25 16:56:10 -07:00
Alexandre Wilhelm 9f5e977bcd Added support for timeZone in CPDatePicker textual 2013-04-16 14:10:52 -07:00
Alexandre Wilhelm 812cd463db Fixed: CPDatePicker works with action and target
Previously the CPDatePicker didn't work with the action and target. Now each time the dateValue changed, the given action is sent to the target.
This commit fix also a bug with moving with tab and the arrows. Before, the left arrow worked liked a tab when the firstElementTextField was selected in a textual CPDatePicker.

Test app in Tests/Manual/CPDatePicker.
2013-04-05 11:28:41 -07:00
Alexandre Wilhelm 36b337e784 Fixed bug about left moving 2013-04-05 11:13:28 -07:00
Alexandre Wilhelm 27bb85bb00 Fixed bug about firstResponder. Fixed bug about current date when changing the month (to pass from the 31 to 30) 2013-03-27 11:23:20 -07:00
Alexandre Wilhelm 1649ea64cc New: CPDatePicker Support
- Added CPDatePicker
- Added CPLocale
- nib2cib for CPDatePicker

Test app in Tests/Manual/CPDatePickerTest
2013-03-26 16:52:46 -07:00