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
Alexander Ljungberg
d3c4105429
Formatting recent changes.
2014-07-22 12:09:06 +01:00
cacaodev
770b0c7022
Here is an ojtest for this issue.
2014-06-07 18:34:59 +02:00
Martin Carlberg
e511638962
Fixed: Cleaned up return and parameter types on methods.
2013-11-24 22:21:56 +01:00
Alexander Ljungberg
8bcbeb0aa9
Improve code readability with dictionary literals.
2013-02-25 17:02:36 +00:00
Aparajita Fishman
9c408bcf5a
Ahem…Javascript object keys are literals, even without quotes!
2013-02-16 16:57:35 -05:00
Aparajita Fishman
1f98dbdf65
Fixed test cases
2013-01-24 09:01:54 +08:00
Antoine Mercadal
71f502a8e8
Fix some ivar masking in tests
2013-01-10 23:04:12 -08:00
Aparajita Fishman
5c0e079873
CPBinder: In reverseSetValueFor:, suspend observation to avoid unwanted setValueFor:
...
isssue #1463
Manual test and ojtest.
2012-04-10 17:28:20 -04:00
Alexander Ljungberg
04d33e772f
Allow binding a table column value to an array controller reached through a key path.
...
Cocoa might not support this but it is reasonable and consistent, and allows indirect bindings when using multiple CIB files.
2011-10-06 01:59:56 +01:00
Alexander Ljungberg
889e8d3b6e
Test automatic table bindings.
2011-10-06 00:36:13 +01:00
Alexander Ljungberg
908fc67f96
Whitespace cleanup.
2011-10-06 00:11:59 +01:00
Alexander Ljungberg
b159815349
Suppress binding updates support.
2011-06-04 00:57:57 -04:00
Alexander Ljungberg
76400ecca9
Make table column internal bindings support methods private.
2011-03-31 20:48:51 -04:00
Klaas Pieter Annema
3d5232b308
give objects a chance to change their binder class
...
- make every object calling getBinding:forObject: aware of this change
- implement _CPCheckBoxValueBinder to handle binding to the value of a checkbox Closes : #1083
- re-implement CPTextField's behavior for controller markers using the new binder class
- disabled some tests that are not compliant with Cocoa
2011-01-07 14:14:19 +01:00
Klaas Pieter Annema
eee1dcef13
restore the original placeholder when unbinding
2011-01-07 14:14:19 +01:00
Klaas Pieter Annema
de1ebe6319
add test case for previous fix
2010-12-22 10:49:02 +01:00
Klaas Pieter Annema
221fad6c3e
improve _setCurrentValueIsPlaceholder logic
2010-11-23 12:03:00 +01:00
Alexander Ljungberg
16e9fce5b5
Unit test exposing a new bug: setting a binding on a text field causes it to lose its placeholder string.
2010-10-02 14:38:34 -04:00
Klaas Pieter Annema
8fe67b73da
implement _setCurrentValueIsPlaceholder in CPTextField
...
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.
2010-09-23 10:35:41 +02:00
Klaas Pieter Annema
2fba03dc75
fix style issues in CPTextField and CPKeyValueBindingTest
2010-09-23 10:35:41 +02:00
Ross Boucher
8fd564b034
Minor cleanup to the current test cases.
2010-05-28 10:54:45 -07:00
Alexander Ljungberg
45a2bcb71a
Fixed bindings problems where 'nil' would be transformed into @"". Also, CPIsNilTransformerName and its inverse couldn't work because any nil value was immediately returned without transformations being applied. Full complement of unit tests included, based on Cocoa empirical testing.
...
Fixed with CPKeyValueBinding: the CPValueTransformerNameBindingOption option would cause an exception due a missing import.
2010-05-26 19:50:35 -04:00
Alexander Ljungberg
8b2350fb22
Optimized table data loading when using bindings for the cell values. A special code path in the CPTableColumn's prepareDataView:forRow: method turns a O(n) operation into O(1) where n is the number of items in the model array.
2010-05-26 19:42:59 -04:00
Ross Boucher
1acb130be1
Add preliminary support for Key Value Bindings to Cappuccino.
2009-02-07 12:54:59 -07:00