1 Reply Latest reply on Aug 19, 2010 11:04 PM by Flex harUI

    Runtime problems after migrating from Flex3 to 4 in compatibility mode

    stef2010

      We are migrating our Flex-3.2 application to Flex 4.1, mainly to take advantage of the new text flow/engine features. In a first step we decided to go with compiling for MX-only and in Flex-3-compatibility mode.

       

      Thanks to some helpful resources (

       

      http://www.adobe.com/devnet/flex/articles/flexbuilder3_to_flashbuilder4.html

       

      http://stackoverflow.com/questions/1563482/any-flex-4-migration-experience

       

      http://www.adobe.com/devnet/flex/articles/flex3and4_differences_02.html

       

      ) I am able to compile our application.

       

      But I find myself surprised about the amount of runtime differences ranging from the problem that I cannot cast ResultEvent.currentTarget to HTTPService ( which apparently was introduced in 3.5 ) to many layout problems to differences in event dispatching ( e.g. one of our legacy components listens to the add event which it just doesn't seem to get anymore ).

       

      It seems there is very little documentation on this. I'd like to find a list with detailed changes so that we don't have to rely on QA to stumble across hopefully all issues.

       

      This documents lists some, but doesn't seem exhaustive.

       

      Does someone have a better list of documented changes from SDK 3.2 to 4.1?

       

      Thanks

      Stefan

       

      PS. Concrete example of one surprising change:

       

      In Flex 4:

       

          <?xml version="1.0" encoding="utf-8"?>

          <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

          xmlns:mx="library://ns.adobe.com/flex/mx" layout="absolute" minWidth="955" minHeight="600">

       

          <fx:Script>

          <![CDATA[

         

          private function notFired():void

          {

          trace("ADDED");

          }

         

          private function fired():void

          {

          trace("COMPLETE");

          }

          ]]>

          </fx:Script>

         

          <mx:TextArea add="notFired();" creationComplete="fired();"/>

         

          </mx:Application>

       

      Now do the same in Flex 3 and you'll see both events fire.