Skip to content

isForward support for binding direction #851

Closed
wants to merge 3 commits into from

2 participants

@nicolasbadia
SproutCore member

This pull request is base on this one: #147

The main difference is on line 522 where the isForward argument has
been add.

I assume this was the missing part of the previous pull request.

Nicolas BADIA isForward support for binding direction
This pull request is base on this one: #147

The main difference is on line 522 where the isForward argument has
been add.

I assume this was the missing part of the previous pull request.
fd26f74
@nicolasbadia
SproutCore member

@publickeating Do you have some informations why the pull request #147 was closed ?

This is a key feature for me. I'm kind of surprised no one show interest for it.

@publickeating
SproutCore member
@nicolasbadia nicolasbadia Fix an issue where the transformed value was not sync with the "from"…
… object if the transform function has changed it

Bug reported here: #859

This fix could lead to infinit loops with existing apps if the
transformed value is not meant to be sync back with the "from" object
and if the developer forgot to use oneWay instead of from to define the
binding. For this, I've add a developer warning saying that it should
use oneWay.

I've also add the syncTransformedValue parameter to the transform
method. For complex case, where we use isForward to transform the
property differently between the two binded objects, it can be usefull
to disable the synchronisation.

I've updated all the predefined transform functions to use oneWay
instead of from. In fact, I believe oneWay should have been use
initially. Because of this bug, there were no difference using from or
oneWay.
927e02e
@nicolasbadia
SproutCore member

I've just updated this pull request to add a fix for issue: #859

See the description of my commit for additional information.

@nicolasbadia nicolasbadia referenced this pull request Dec 16, 2012
Closed

SC.Binding custom #859

@nicolasbadia
SproutCore member

Since this pull request group 2 issues, I'm closing this one to make two other ones:

  • One with isForward support
  • And one to fix issue #859 (with a few more enhancements)
@nicolasbadia nicolasbadia added a commit to nicolasbadia/sproutcore that referenced this pull request Feb 5, 2013
@nicolasbadia nicolasbadia isForward support for binding direction
See the following pull requests for more details: #147 and #851.
5a2251f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.