1 Reply Latest reply on Jul 21, 2011 2:27 AM by Claudiu Ursica

    Porting issues

    G1Z Level 1

      Hi All,


      I am porting one of my Flex 3.5 apps to Flex 4.5 with Flex 3.5 compatibility enabled ( to escape from the list of errors I get and eventually have to remove this to make use of the full Flex 4.5 capabilities). Well first things first


      Though I managed to escape from these errors, I see the following warnings  couple hundred times which annoys me all the time.

      Application.application.removeLoadingAnimation(); ///this is the line of code which my Flex 3.5 code used and  I get the following warning message for this line





      application has been deprecated since Flex 4.0. Please use the FlexGlobals.topLevelApplication .


      My question is can I go ahead and just replace the application in Application.application with FlexGlobals.topLevelApplication or something else needs to be done in this case??? Please suggest.


      I will post the issue in porting when I remove the Flex 3 compatibility mode checkbox later.



      Thanks in Advance,


        • 1. Re: Porting issues
          Claudiu Ursica Level 4

          I believe in your case it is the better way to go, just replace it with FlexGlobals .... . However in my opinion is not ok to reference globals from several places within your app. Use some messaging system or a framework that can send messages in a decoupled way. But as I said at this point your first concern should be to get it running. The refactoring can happen at a later stage.