Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It looks like your getters are returning voids. They should be returning uints, according to your field types.</p> <p>Otherwise your code should be working fine. I've assembled and tested a working version with a Timer that sets all four values, so you can see all four updating:</p> <p><strong>Main.mxml:</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*" creationComplete="onCreationComplete()"&gt; &lt;mx:Script&gt; &lt;![CDATA[ private function onCreationComplete():void { var t:Timer = new Timer(1000); t.addEventListener(TimerEvent.TIMER, t_tick); t.start(); } private function t_tick(event:TimerEvent):void { var i:uint = Timer(event.currentTarget).currentCount; abc.xyz.prop1 = i; abc.xyz.prop2 = i; abc.xyz.prop3 = i; abc.xyz.prop4 = i; } ]]&gt; &lt;/mx:Script&gt; &lt;local:ABC id="abc" /&gt; &lt;mx:VBox&gt; &lt;mx:Text text="{abc.xyz.prop1}" /&gt; &lt;mx:Text text="{abc.xyz.prop2}" /&gt; &lt;mx:Text text="{abc.xyz.prop3}" /&gt; &lt;mx:Text text="{abc.xyz.prop4}" /&gt; &lt;/mx:VBox&gt; &lt;/mx:Application&gt; </code></pre> <p><strong>ABC.as</strong></p> <pre><code>package { import mx.core.UIComponent; [Bindable] public class ABC extends UIComponent { public var xyz:XYZ = new XYZ(); public function ABC() { super(); } } } </code></pre> <p><strong>XYZ.as</strong></p> <pre><code>package { [Bindable] public class XYZ extends Object { private var _prop1:uint = 0; private var _prop2:uint = 0; private var _prop3:uint = 0; private var _prop4:uint = 1; public function XYZ() { super(); } public function get prop1():uint { return _prop1; } public function set prop1(value:uint):void { _prop1 = value; } public function get prop2():uint { return _prop2; } public function set prop2(value:uint):void { _prop2 = value; } public function get prop3():uint { return _prop3; } public function set prop3(value:uint):void { _prop3 = value; } public function get prop4():uint { return _prop4; } public function set prop4(value:uint):void { _prop4 = value; } } } </code></pre> <p>Have a look at those, plug things in and you should see it all come together. Post back if you have any questions. Cheers.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload