2 Replies Latest reply on Sep 30, 2009 4:37 PM by bullwrinkle

    Flex 4: what is <application> namespace?


      I'm studying the sample code from Deepa Subramaniam's talk on "Creating new components in Flex 3 and 4" and the main.mxml looks like this:


      <Application xmlns="http://ns.adobe.com/mxml/2009" backgroundColor="0xFFFFFF"
                       width="800" height="700" xmlns:comps="comps.*" layout="vertical">
               <!-- We use CSS to associate the skin with the component. Here the skin living in skins/FxVideoWidgetSkin.as is the basic
                    skin for the FxVideoWidget component -->
                   skinClass: ClassReference("skins.FxVideoWidgetSkin");
               <ShaderFilter byteCode="@Embed(source='CRT.pbj', mimeType='application/octet-stream')"  id="hydraFilter"/>   





      This generates the compile time error: "Could not resolve <Application> to a component implementation" using a recent Flex 4 SDK. I have also seen several other applications that reference an Application without a namespace specifier, such as <mx:Application> or <s:Application> for the Halo and Spark component libraries. So what are they doing? What libraries do I need to add to my build path?

        • 1. Re: Flex 4: what is <application> namespace?
          deepa subramaniam (adobe)



          It looks as if you're referencing the materials from my MAX 2008 talk component lifecycle talk (Building Flex 3 Components and Beyond). I gave a newly updated flavor of this talk last week at the SILVAFUG and BAADAUG user group meetings which covers both the Flex 3 and Flex 4 component lifecycle in more detail. I updated the code and slide samples for those two talks, and now they are more in-sync with the current state of the Flex SDK trunk (as opposed to the MAX talk materials, obviously, since it was from over a year ago!).


          So, please reference this blog post for the updated code samples and slides: http://iamdeepa.com/blog/?p=44


          The older materials have a lot of stuff that are not applicable in the current Flex SDK trunk. For example, they still reference the 'Fx' prefix which have since been dropped in favor of specific namespaces. Please use the materials from the link above and you should be set! Feel free to comment on my blog with specific questions (as opposed to the forums).


          Thanks and have fun!

          Deepa Subramaniam, Flex SDK

          • 2. Re: Flex 4: what is <application> namespace?
            bullwrinkle Level 1

            Thanks! I just downloaded the zip file. Saw and enjoyed your talk in SF a couple of weeks ago. I figured that you were so busy with MAX 2009 that you wouldn't have a chance to further update it. Glad that I was wrong.