Commit Graph
60 Commits
Author SHA1 Message Date
Antoine Mercadal 59d1da77c2 Fixed: setting CPNullPlaceholderBindingOption in binding was setting the value
This commit fix a bug where declaring the binding option CPNullPlaceholderBindingOption was actually setting the
actual value of a text field instead of just its placeholder. This commit adds a test to determine if the binding source
implements setPlaceholderString:. In that case, we let the value to be nil.
2013-04-01 12:47:00 -07:00
Aparajita Fishman a01de54b65 Fixed: optimize access to object property
Accessing a property via dot notation is faster than indexing via a string.
2013-03-09 14:34:58 -05:00
Stefan Wallström bd269501ac Fixed parameter type for _placeholderForMarker: 2013-03-07 12:49:19 +01:00
Stefan Wallström 455ff57eec Fixed return type for _placeholderForMarker: 2013-03-07 12:39:04 +01:00
Stefan Wallström 51e682335b Use UID instead of hash. 2013-03-07 12:37:35 +01:00
Stefan Wallström 262bd5b7c1 Use dedicated class, _CPStateMarker, instead of CPString for selection markers. 2013-03-06 19:30:17 +01:00
Alexander Ljungberg 5b05dc92a1 More dictionary literals. 2013-02-25 18:27:44 +00:00
Alexander Ljungberg 8bcbeb0aa9 Improve code readability with dictionary literals. 2013-02-25 17:02:36 +00:00
Aparajita Fishman 02b7198e9b Added action bindings to CPMenuItem
Updated MultipleValueBindings app to use action bindings in About and Help menu items.
2013-02-19 17:25:29 -05:00
Aparajita Fishman abaa1e81f2 Support for multiple-value bindings
- CPView and subclasses support multiple-value hidden bindings.
- CPControl and subclasses support multiple-value enabled bindings.
- CPWindow and CPBox support multiple-value title with pattern bindings.
- CPButton supports multiple argument + target bindings.
- CPImageView and CPTextField support multiple-value editable bindings.
- CPMenuItem supports multiple-value enabled bindings.
- Fixed bugs in CPObjectController with simple collection operators.
- CPColorWell uses black as the placeholder color.
- Runtime object attributes from a cib are applied as they are read, not deferred.
- NSNumberFormatter now reads the number style from the xib.
- Normalized some parameter names.
- Formatting.
- Test app for all binding types.
2013-02-15 12:21:13 -05:00
Aparajita Fishman 6472ac7701 Formatting, import fixes 2013-02-12 22:29:31 -05:00
Aparajita Fishman a622f5ca9b Formatting 2013-02-11 23:08:08 -05:00
Martin Carlberg 458fa9d02e Fixed a lot of small bugs found by new warning message from compiler 2013-01-18 14:24:37 +01:00
Martin Carlberg b52217e8a0 Tried to make the import mess a little better. Fixed a lot of bugs. Changed some class names in the test cases. Looks like all the tests are being run in the same space. Has to look into this….. 2012-12-17 00:40:26 +01:00
Martin Carlberg c297e926f9 Compiler now works with jake and can compiler the whole Cappuccino framework. A lot of test cases still fail 2012-12-16 17:38:47 +01:00
cacaodev da01d3aaaa do it right 2012-11-26 18:31:08 +01:00
cacaodev 6c4d1e5ce1 CPBinder _updatePlaceholdersWithOptions : Added forBinding:(CPString)aBinding argument.
If a binder instance can manage several bindings, you may want to set placeholders depending on the binding name.
2012-11-22 15:33:01 +01:00
Martin Carlberg f6b378513d Merge branch 'master' of https://github.com/cappuccino/cappuccino into binding_support_popup_button
Conflicts:
	AppKit/CPKeyValueBinding.j
	AppKit/CPPopUpButton.j
	Tests/AppKit/CPPopUpButtonTest.j
2012-07-23 11:19:21 +02:00
Aparajita Fishman 32737e0b72 CPComboBox and CPTextField enhancements
- Full Cocoa-compliant implementation of CPComboBox and CPComboBoxDelegate.

- Better focus ring for CPTextField and all subclasses.

- CPTextField and its subclasses draw disabled contents differently, per Cocoa.
2012-07-06 00:15:23 -07:00
Martin Carlbergandcacaodev fec1586380 CPPopUpButton bindings support (set for all and reverse for selection related bindings) using a CPBinder subclass instead of dedicated selectors. 2012-06-29 19:40:23 +02:00
cacaodev 8e2afde3e4 CPKeyValueBinding -reverseSetValueFor: -> extract a method for getting the source value for a given binding. the goal is to facilitate subclassing. 2012-06-29 19:37:35 +02:00
cacaodev 487d38fd21 Merge remote-tracking branch 'upstream/master' into CPImageView-bindings 2012-04-12 23:12:09 +02: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
cacaodev d649fc2413 Merge remote-tracking branch 'upstream/master' into CPImageView-bindings 2012-04-10 22:26:23 +02:00
cacaodev 742bfcb0e7 Fix non-applicable syntax 2012-04-10 22:06:50 +02:00
cacaodev f222d7bfe7 CPBinder: move placeholder handling to superclass, add 2 subclassable methods for appying the regular value or a placeholder value.
Update binder subclasses for CPTextField, CPCheckBox, CPColorWeel.
2012-04-10 21:48:09 +02:00
cacaodev b6a173cc0c CPImageView: support CPValueURLBinding and CPValuePathBinding. Readonly. With test. 2012-04-07 13:16:16 +02:00
Alexander Ljungberg 32a86a911f Allow custom binders to set default placeholders.
This makes it easier to write custom binders.
2012-03-07 14:31:53 +00:00
Aparajita Fishman 1c2a304ee5 Assignment of function is a statement and should be semicolon terminated. Some miscellaneous linting as well. 2012-01-05 17:51:37 -10:00
Alexander Ljungberg 3592fd8dae Whitespace cleanup. 2011-10-06 01:59:48 +01:00
Alexander Ljungberg b159815349 Suppress binding updates support. 2011-06-04 00:57:57 -04:00
Alexander Ljungberg 3d1638c780 Fixed: remove unused var block. 2011-05-30 16:56:24 -04:00
Alexander Ljungberg 110d75b1e5 Text field support for CPContinuouslyUpdatesValueBindingOption. 2011-03-28 18:20:19 -04:00
Alexander Ljungberg 79ec12e2a2 Added support for the CPNullPlaceholderBindingOption for bound text fields. 2011-03-28 18:02:52 -04:00
Tobias M. BölzandRoss Boucher 49707af1ba Fixed binding name constants 2011-03-02 13:17:44 -08: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
cncolder 3e9e0802f6 Show null placeholder when the value is CPNull. 2010-12-22 15:15:05 +08:00
Ross Boucher 3f2dd34ee5 We should be using UID not hash 2010-12-08 16:43:45 -08:00
cacaodev 5bec411bdc Fix for nib2cibing bindings options. 2010-11-23 19:38:03 +01:00
Klaas Pieter Annema 221fad6c3e improve _setCurrentValueIsPlaceholder logic 2010-11-23 12:03:00 +01:00
Francisco Ryan Tolmasky I 52f7844aee Made it so .h files are automatically included in AppKit (avoiding needing to manually include Platform.h, etc.).
Also changed a bunch of <AppKit/*> imports to "*" imports.

Reviewed by me.
2010-11-01 11:10:01 -07:00
Joachim GarthandRoss Boucher 834480ff68 Fixed a bug in reverseTransformValue: that caused transformedValue: to be called instead of reverseTransformedValue: 2010-10-18 10:46:13 -07:00
Klaas Pieter Annema afc5b72092 made setting binding placeholder values slightly less hacky 2010-09-23 10:35:41 +02:00
Klaas Pieter Annema 14f494a25d Properly set multiple value placeholders on textfields.
Previously CPKeyValueBinding would just set the binding marker placeholder values as the stringValue of the textfield. This commit fixes that and properly sets those values as the placeholder value.
2010-09-23 10:35:41 +02:00
Alexander Ljungberg 494f39dd86 Closes #752. Removed some debug code which snuck in with the merge of fix-752-CPValueTransformerNameBindingOption. 2010-08-12 23:37:53 -04:00
Klaas Pieter Annema 914175de70 If CPValueTransformerNameBindingOption contains an existing class, allocate and use it in CPKeyValueBinding 2010-07-12 15:41:00 +02:00
Nicholas Small 6a689dc3df Fix for asking the wrong object for -_replacementKeyPathForBinding: when creating a new binding. 2010-06-30 12:00:20 -04:00
Scott KyleandRandall Luecke 1899250a53 Semicolons are nice... 2010-06-10 16:42:28 -05: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