Skip to content

Instantly share code, notes, and snippets.

@olafkrueger
Last active September 30, 2016 15:35
Show Gist options
  • Save olafkrueger/4dc354f7e888bf632398c16f27aa8234 to your computer and use it in GitHub Desktop.
Save olafkrueger/4dc354f7e888bf632398c16f27aa8234 to your computer and use it in GitHub Desktop.
FlexJS simple binding test case
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:local="*"
xmlns:js="library://ns.apache.org/flexjs/basic"
applicationComplete="onApplicationComplete()">
<fx:Script>
<![CDATA[
[Bindable] public var fieldText:String;
public function onApplicationComplete():void {
fieldText = "Doesn't work";
//field.text = "Works";
}
]]>
</fx:Script>
<js:valuesImpl>
<js:SimpleCSSValuesImpl />
</js:valuesImpl>
<js:beads>
<js:ViewDataBinding />
</js:beads>
<js:initialView>
<js:View>
<!-- Placing it here has also no effect
<js:beads>
<js:ViewDataBinding />
</js:beads>
-->
<js:Label id="field" text="{fieldText}"/>
</js:View>
</js:initialView>
</js:Application>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment