Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 9ad4ca07c0143d3429c6c7957e972fae01e0386c 1 parent 3f91289
@dcporter dcporter authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 frameworks/runtime/system/binding.js
View
7 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
===
Please sign in to comment.
Something went wrong with that request. Please try again.