Browse files

Adds some documentation to SC.Binding to clarify the issue raised in #…

  • Loading branch information...
1 parent 3f91289 commit 9ad4ca07c0143d3429c6c7957e972fae01e0386c @dcporter dcporter committed Feb 15, 2014
Showing with 6 additions and 1 deletion.
  1. +6 −1 frameworks/runtime/system/binding.js
@@ -95,7 +95,7 @@ SC.EMPTY_PLACEHOLDER = '@@EMPTY@@';
In addition to synchronizing values, bindings can also perform some basic
transforms on values. These transforms can help to make sure the data fed
- into one object always meets the expectations of that object regardless of
+ into one object always meets the expectations of that object, regardless of
what the other object outputs.
To customize a binding, you can use one of the many helper methods defined
@@ -121,6 +121,11 @@ SC.EMPTY_PLACEHOLDER = '@@EMPTY@@';
`notNull`, `multiple`, `bool`, `not`, `isNull`, `and` (two values only), `or` (two
values only), and `equalTo`. See each method's documentation for a full description.
+ (Note that transforms are only applied in the forward direction (the 'to' side); values
+ are applied untransformed to the 'from' side. If the 'from' object has validation
+ needs, it should own and apply them itself, for example via a read/write calculated
+ property.)
Adding Custom Transforms

0 comments on commit 9ad4ca0

Please sign in to comment.