1 Reply Latest reply on Jun 26, 2012 5:39 AM by pauland

    bindable getter

    nikos101 Level 2

      how can I update the view when CURRENT_ENV changes?

       

      <s:Label  text="{environmentModel.environment}"/>

       

      the top of my class is like so:

       

       

       

          [Bindable]

          public class EnvironmentModel extends EventDispatcher

       

       

      ........

       

       

      public  function get environment():String

              {

                  switch (CURRENT_ENV)

                  {

                      case DEV_ENV:

                      {

       

                          var env:String="DEVELOPMENT";

                      }

       

                      case UAT_ENV:

                      {

                          env="UAT";

                      }

                      case UAT_ENV:

                      {

                          env="LIVE";

                      }

                  }

                  return "The current environment is " + env;

              }