Commit Graph
347 Commits
Author SHA1 Message Date
Martin Carlberg 5b7afd72e3 Fixed: Test cases now use correct options for KVO change dictionaries 2014-10-09 19:30:05 +02: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
cacaodev a2755221d0 The cocoa behavior is:
Exclusive bindings are impossible in IB
Possible in code (tested with segmented control and selectedIndex & selectedTag) but then you get unexpected behavior. A segment can be selected after a click and then
changes to another segment.
After this commit, extra exclusive bindings are just ignored and we warn about it.
2014-09-12 22:33:50 +02:00
cacaodev 68b193a782 NEW: bind:toObject: ... now checks if another binding mutually exclusive is already binded. Throws an exception if this is the case.
Controls can implement -isExlusiveBinding: to determine if bindings are exclusive. Defaults to NO.
Exclusive bindings are mainly CPSelectedIndexBinding | CPSelectedTagBinding | CPSelectedValueBinding
2014-09-09 20:31:15 +02:00
Alexandre Wilhelm aded1dd4da Merged: manual merged 2014-09-05 13:00:48 -07:00
Antoine Mercadal cf93b72edd Merge pull request #2173 from daboe01/Fixed--collectionViewDidChangeSelection
Fixed: support for outdated collectionViewDidChangeSelection delegate method
2014-09-04 13:57:39 -07:00
Alexandre Wilhelm cf0b4c8f03 Fixed: added CPView test for the method addSubview 2014-08-28 22:23:20 -07:00
daboe01 b24f5b6ad6 fixed unit test 2014-08-24 14:12:44 +02:00
Alexandre Wilhelm 9ed30f563a Fixed: Methods viewDidMoveToSuperview viewDidMoveToWindow viewWillMoveToSuperview viewWillMoveToWindow not called as in Cocoa
Previously, when adding, removing, replacing a CPView, the framework didn't call the methods viewDidMoveToSuperview, viewDidMoveToWindow, viewWillMoveToSuperview and viewWillMoveToWindow as in Cocoa. Now it does.

The main change is that these methods will be called when removing a CPView.

Added unit-test in Tests/AppKit/CPViewTest.j
2014-08-19 14:26:26 -07:00
Alexandre Wilhelm 3e4c03852d Fixed: Memory leaks in CPOutlineView + corrupted itemInfos dictionary
Previously, when reloading a CPOutlineView with different datas than before, the CPOutlineView kept a reference of the previous datas.
Now, when reloading, the CPOutlineView will delete these references when we don't need it anymore. For that, the CPOutlineView will only try to delete the previous reference when we have reloaded the children of a node, otherwise it will keep the other references.

This PR fix some issue with the following methods :

- (BOOL)isExpandable:(id)anItem;
- (BOOL)isItemExpanded:(id)anItem;
- (CPInteger)rowForItem:(id)anItem;
- (CPInteger)levelForItem:(id)anItem;
- (id)itemAtRow:(CPInteger)aRow;
- (CPInteger)levelForItem:(id)anItem;
- (CPInteger)levelForRow:(CPInteger)aRow;

Previously these methods took care about not displayed items. Now they just work with displayed items.

Added unit-tests in Test/AppKit/CPOutlineViewTest.j

Test app in Test/Manual/CPOutlineViewTestCib
2014-08-08 15:05:24 -07:00
Alexander Ljungberg 7470f4ffcf New: CPEvent scrollingDeltaX, scrollingDeltaY and hasPreciseScrollingDeltas.
Refs #2013.
2014-07-23 15:00:30 +01:00
Alexander Ljungberg d3c4105429 Formatting recent changes. 2014-07-22 12:09:06 +01:00
Antoine Mercadal ed307adb22 Merge pull request #2135 from Dogild/TokenFieldDelegate
Fixed: unsigned delegate methods of CPTokenField erased by CPTextField
2014-07-18 18:42:49 -07:00
Antoine Mercadal 8001688daf Merge pull request #2076 from cacaodev/issue2039
FIXED: Error when binding several objects to the same objectController [+1]
2014-07-18 18:42:18 -07:00
Alexandre Wilhelm 33043dd8af Fixed: removed unsued code in CPTokenFieldTest 2014-07-13 21:25:35 -07:00
Alexander Ljungberg 5fafc97bc0 Merge branch 'master' into fastobjj 2014-06-22 13:05:32 +01:00
Alexander Ljungberg fba900707a Test: formatting, fix name of previous test.
Refs #2103.
2014-06-22 12:58:24 +01:00
Alexander Ljungberg 175a455d75 Test: add CPAutosizePerformance test to validate objj_msgSend speed improvements.
This test was written by cacaodev.

Refs #2103.
2014-06-22 12:57:11 +01:00
Alexandre Wilhelm 4568dfabb9 Added: added unit test for CPTokenField 2014-06-12 10:58:11 -07:00
cacaodev 770b0c7022 Here is an ojtest for this issue. 2014-06-07 18:34:59 +02:00
Alexander Ljungberg ba27a4cc4a Fixed: new first responder and key window theme states not always applied. 2014-05-12 15:17:49 +01:00
Alexander Ljungberg 025a43ea4e New: CPThemeStateKeyWindow for CPView.
Every view in the key window now takes on the 'key window' theme state. This makes it easy to theme everything in inactive windows in more muted colours. Also, combined with the first responder theme state of the previous commit we can have visuals like "first responder but in an inactive window" for text views and such things.
2014-05-11 15:51:17 +01:00
Alexander Ljungberg 050fcf2ab8 New: CPThemeStateFirstResponder for CPView.
When a CPView becomes the first responder it now takes on the 'first responder' theme state, as does all its subviews. This allows it to naturally change appearance when it has the keyboard focus, such as with focus rings and brighter colour schemes.
2014-05-11 15:48:37 +01:00
Alexander Ljungberg c9642fcf35 Test: CPLevelIndicatorTest.
Refs #2071.
2014-05-09 23:24:50 +01:00
Saikat Chakrabarti 647686e68e Fix CPViewTest 2014-03-10 12:17:23 -07:00
Saikat Chakrabarti 45df8c0f74 Fix bug with unsetThemeState + more tests. 2014-03-09 15:15:11 -07:00
Alexander Ljungberg e6acc3c336 Fixed: missing var, minor tweaks.
Refs #2073.
2014-03-06 14:03:46 +00:00
Saikat Chakrabarti 2fd8940c02 Allow array arguments to various methods that take ThemeStates 2014-03-01 23:11:24 -08:00
Saikat Chakrabarti 68952b273b Add a bunch of unit tests for CPTheme.j 2014-02-21 14:30:09 -08:00
Saikat Chakrabarti 8b2f2fe24d Add new unit tests for CPView 2014-02-21 13:11:08 -08:00
Saikat Chakrabarti 7d304fbd51 First round of changes to change theming system to use arrays and not bitmasks as their underlying datatype 2014-02-20 17:30:27 -08:00
Alexandre Wilhelm e822966464 Fixed: removed unused test case 2013-12-10 11:00:47 -08:00
Alexandre Wilhelm 7b86465d7b New : Added protocols CPTableViewDelegate and CPTableViewDataSource
This PR adds protocols CPTableViewDelegate and CPTableViewDataSource

Unit test in Tests/AppKit/CPTableViewTest.j
2013-12-08 17:48:41 -08:00
Martin Carlberg e511638962 Fixed: Cleaned up return and parameter types on methods. 2013-11-24 22:21:56 +01:00
Martin Carlberg 8419001810 Merge branch 'master' of https://github.com/cappuccino/cappuccino into protocol 2013-11-22 14:23:52 +01:00
Antoine Mercadal 985db21ed9 Merge pull request #1990 from spebbe/cpanimation_frame_rate
CPAnimation frame rate fixes.
2013-11-18 16:20:29 -08:00
Alexander Ljungberg 6cbfa30652 Fixed: view coordinate conversion broken by previous commit.
Without this fix, -CPView convertPoint:fromView was broken due to the changes made in #1998. In particular, the transform for the fromView would be calculated and then just thrown away if the views were in the same window. This happened to work in some specific cases and the lack of unit tests concealed the error.

This fix properly applies the transforms when two views are in the same window without one of them necessarily being inside the other.

Refs #1998.
2013-11-04 00:03:31 +00:00
Bruce Doan 6f8d6a5b25 Some minor fixes to pass the capp_lint checks 2013-10-09 00:09:30 +07:00
Bruce Doan 8503081a6f PATCH: Implement shouldExpand/Collapse delegate for CPOutlineView 2013-10-06 23:47:25 +07:00
Alexander Ljungberg 6efefbedcd Test: disabling a highlighted menu item should deselect it.
Refs #1762.
2013-09-23 11:24:54 +01:00
Björn Sperber 5cefce1cf0 Respect frameRate when scheduling timer in CPAnimation. Treat a frameRate of 0 as "really fast" instead of CPTimer default (10 fps). 2013-09-19 13:52:49 +02: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
Alexander Ljungberg d404d027c2 Test: - CPImage initWithContentsOfFile:nil. 2013-07-15 10:48:58 +01:00
Alexander Ljungberg 6ef776e488 Fixed: - CPView nextValidKeyView infinite loop.
Previously, certain situations could easily lead to an infinite loop in - CPView nextValidKeyView. For instance, opening a sheet view with no responder returning YES for canBecomeKeyView would freeze Cappuccino.

This was caused by the cycle detection in nextValidKeyView not being able to pick up on cycles where the nextKeyView of the original receiver did not participate. Since content views often have a next key view inside of them, and the views inside rarely have a next key view back "up" to the content view, the content view would never be seen again even if there was a cycle.

This fix detects cycles at any level by remembering all previous visited responders.
2013-06-25 18:05:46 +01:00
Alexander Ljungberg fe79628034 Fixed: CGRectFromString made bad CGSizeFromString call.
Without this fix, CGRectFromString would call CGSizeFromString with a value like "{1, 2}}" (not the extra trailing "}"). Although CGSizeFromString didn't complain, it wasn't correct either.
2013-06-13 12:46:08 +01:00
Alexander Ljungberg 563300a16f Test: CGGeometry "string from" for point, size and rect. 2013-06-13 12:43:48 +01:00
Alexander Ljungberg 44a872659a New: type check - CPPasteBoard setString:forType:.
When this method is given e,g, an array or CPData, it now crashes early instead of the pasteboard exhibiting strange behaviour.
2013-05-15 08:47:43 -07:00
Alexander Ljungberg f2d9ef7720 Test: - CPPasteboard setString:forType: and stringForType:. 2013-05-14 14:40:41 -07:00
Alexander Ljungberg 3e35e3d8a8 Fixed: CPColorPicker not working with fixed CPColor colorWithHue: implementation. 2013-04-21 14:32:10 +01:00
Alexander Ljungberg 0c2abf3629 Test: new CPColor HSB tests. 2013-04-20 13:56:49 +01:00