CreativeBottle/starlingMVC — pull request #23 by tyoung87 (2013-07-07 06:26:55+00:00)
Title: A fix to property injection with binding where auto is turned off.

...e. Essentially such a binding can't be injected multiple times. So if you have a bean with a specific property that you'd like to have injected into two other beans with binding but not automatic binding, then things start breaking. For example, the following would not work:

public class AppData {

[Bindings]
public var bindings:Bindings

private var _value:String;

public function get value():String {
return _value;
}

public function set value(value:String):void {
_value = value;
bindings.invalidate(this, "value");
}
}

public class BeanToUpdate1 {

private var _value:String;

public function get value():String {
return _value;
}

[Inject(source="appData.value", bind="true", auto="false")]
public function set value(value:String):void {
_value = value;
}
}

public class BeanToUpdate2 {

private var _value:String;

public function get value():String {
return _value;
}

[Inject(source="appData.value", bind="true", auto="false")]
public function set value(value:String):void {
_value = value;
}
}

It would update value in BeanToUpdate1 or in BeanToUpdate2, but not in both. This code fixes the issue.