flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Mclean <jus...@classsoftware.com>
Subject Re: [FlexJS] Setting background colour at run time fails
Date Tue, 14 Feb 2017 01:48:47 GMT

> Do you need a getter if it just gets installed in ValuesManager?

I guess not just seems a little  inconsistent.

Anyway changing the code to this:

<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:js="library://ns.apache.org/flexjs/basic" xmlns:beads="org.apache.flex.html.beads.*">

       <js:ContainerDataBinding />

      import org.apache.flex.core.ValuesManager;

      public function clicked():void {
          bg.backgroundColor = "red";

      public function updateBoxStyles():void {
          ValuesManager.valuesImpl["applyStyles"](box, bg);


              <js:Container id="box" width="100" height="100">
                      <js:BindableCSSStyles id="bg" backgroundColor="grey" />

              <js:TextButton text="Click me" click="clicked()" />


Finally makes it work.

Is there any reason why Container couldn’t have a reapplyStyles method that calls ValuesManager.valuesImp.applyStyles
passing this and this.style?


View raw message