0 Replies Latest reply on Nov 7, 2011 3:01 AM by gbhaskarraju

    Can't able to achieve data Binding inside Application Version check function in an AIR project

    gbhaskarraju

      Hi , I am working on AIR app.It requires some binding data to achieve inside the Appversion check function before we need to install the app. Here is the code that gives a clear look.

       

              [Bindable]

                  private var swf:Object;

              [Bindable]

                  private var apInstalled:String;

             [Bindable]

                  private var appStatus:String;

       

      private function versionCheck(version:String):void {

                      trace("VERSION-------"+version);

                      this.apInstalled = version == null ? 'false' : 'true';

                      trace("APPINSTALLED-------"+apInstalled);

                      trace("APPSTAUS"+appStatus);

                    

                      switch (swf.getStatus()) {

                          case "installed" :

                            launching app;

                              break;

                          case "available" :

                              //dosomething

                              break;

                          case "unavailable" :

                             //do something

                              break;

                      }

                }

       


      private function CheckInstallstatus():void

      {

      trace("AppInstalled"+apInstalled);

      appStatus = "true";

      }

       

       

       

      The initial value of apInstalled is null becasue the AIR app was not installed.When i click on the Install button in browser and install through bridge the "apInstalled" string value in the function is returning as "true" and VERSION as v1.5 in trace .Since apInstalled is binded the new value for apIstalled is "true". But In the later steps I am using the CheckInstallstatus() function and there  I am getting the string value as false in trace eventhough the AIR application was installed.

       

      Similarly I cant access the updated "appStatus"  value inside the versionCheck() function. I am getting null in trace eventhough its assigned to true in CheckInstallstatus().

       

      I am not able figure out the problem why the data binding is not working in this scenario. Please help me in this and any help would be thankful and highly appreciable.