3 Replies Latest reply on Apr 26, 2012 7:44 AM by Heeschi

    Upgrading Flex from 3.2 to 4.5 - Errors and Warnings

    kkudiksx Level 1

      I've inherited a large codebase written primarily in Flex 3.2 using Parsley and Cairngorm.

      The entire build process is done through maven using FlexMojos.

      I'm relatively new to Flex and I've been told to upgrade Flex from 3.2 to the latest 4.5.1 version.

      While I have made a good progress, I have run into some errors that are beyond my understanding or Google search has not been able to help.

      Things I have done:

      1. Changed all namespaces to mxml 2009 and fx.
      2. Put all non-visual components in fx:declarations.
      3. Added namespaces in my stylesheet
      4. Upgraded version of FlexMojos to 3.9 - not 4 because there isn't a stable version yet
      5. Upgrade all cairngorm dependencies to the Flex 4 dependencies, although keeping the same versions.
      6. Exclusively declared that the theme I want to use in the compiler settings is halo.swc
      7. Fixed a lot of compilation warnings and errors which were trivial.

      Things I don't know how to fix:

      While compiling, I get a lot of warnings with regards to CSS. An example of warning I get is the following:

      [WARNING] C:\repo\com\adobe\flex\framework\framework\4.0.0.14159\framework-4.0.0.14159.swc$defaults .css:[487,-1] The style 'dropShadowVisible' is only supported by type 'mx.controls.List' with the theme(s) 'spark'.

      For a start, I'm not using 4.0.014159, although something's telling me that the dependency is being pulled through a Cairngorm library such as validation or module. If so, any solutions to that?

      Additional warnings I get which I don't understand how to fix are the following:

      [WARNING] The swc 'C:\repo\com\adobe\flex\framework\framework\4.5.1.21328\framework-4.5.1.21328.swc' has style defaults and is in the library-path, which means dependencies will be linked in without the styles. This can cause applications, which use the output swc, to have missing skins. The swc should be put in the external-library-path.

      Regarding the above, I read somewhere that the swc file has to be loaded an external library path instead. I did that but the warning didn't go away.

      Finally, the app fails to compile as a result of these errors. There's like 10 of the same one.

      [ERROR] C:\repo\com\adobe\flex\framework\mx\4.5.1.21328\mx-4.5.1.21328.swc$defaults.css:[469,-1] Invalid Embed directive in stylesheet - can't resolve source 'Embed(source = "assets/CalendarIcon.png")'.

      There's no reference of the CalendarIcon.png asset in my codebase. Google pointed me out to thishttp://python.mmitd.com/bugs.adobe.com/jira/browse/SDK-22746, but I'm afraid nothing I've done worked.

      As you can see the majority of my warnings/errors (at least for now) lie around "default.css" warnings.

      Any help will be greatly appreciated!

        • 1. Re: Upgrading Flex from 3.2 to 4.5 - Errors and Warnings
          Flex harUI Adobe Employee

          A .SWC is just a .ZIP file.  You can open it and see what’s inside.  The main errors seem to indicate that a source-path is not set up properly, but I don’t know anything about how Maven works I can’t help you much beyond that.

           

          In Flex 4, the Spark theme is the default and it doesn’t have all of the styles of the old Halo theme so you will get these warnings unless you switch back to the Halo theme and only use MX components.

          • 2. Re: Upgrading Flex from 3.2 to 4.5 - Errors and Warnings
            kkudiksx Level 1

            I think I managed to solve most errors. Parsley and Cairngorm bring with them 4.0.* dependencies. As a result, flex mojos was using 4.0 dependencies sometimes in the library path and the errors you'd get, were of the nature I posted in my original post.

             

            I have used the -theme flag when compiling to use the Halo swc file so that shouldn't be an issue. I'm not looking to use any spark components at the moment.

            • 3. Re: Upgrading Flex from 3.2 to 4.5 - Errors and Warnings
              Heeschi

              Hi,

              I got a similar Error and I realy don't know how to solve it...

              Here is my error:

               

              ReferenceError: Error #1065: Variable _class_embed_css_assets_CalendarIcon_png_1299410737_2127374076 ist nicht definiert.

              at flash.display::MovieClip/nextFrame()
              at mx.core::FlexModuleFactory/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework \src\mx\core\FlexModuleFactory.as:730]
              at mx.core::FlexModuleFactory/update()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\cor e\FlexModuleFactory.as:503]
              at mx.core::FlexModuleFactory/moduleCompleteHandler()[E:\dev\4.5.1\frameworks\projects\frame work\src\mx\core\FlexModuleFactory.as:828]

               

              This error appears if I start my applikation and navigate to a certain module. I think this error appears since I swaped to flex 4.

              I realy don't know if this is a maven / pom - error or just a .css error, because it's a flex style...

               

              Someone have a idea?