4 Replies Latest reply on Apr 21, 2010 8:06 AM by CatPoweredTM

    Cannot resolve namespace qualified type ... in CSS selector ...

    GardenAway

      Upgraded from FB 4 Beta to FB 4 GA.

       

      Now using

       

      @namespace mx "library://ns.adobe.com/flex/mx";

       

      in CSS

       

      and

       

      Use Flex 3 compatibility mode with compiler

       

      yet all CSS entries report a warning with ...

       

      Cannot resolve namespace qualified type 'Accordion' in CSS selector 'Accordion' GardenAway line 154 Flex Problem

      Cannot resolve namespace qualified type 'AccordionHeader' in CSS selector 'AccordionHeader' GardenAway line 173 Flex Problem
      and so on..
      Perhaps related, when attempting to run, get trap:
      TypeError: Error #2007: Parameter type must be non-null.
      at flash.events::Event()
      at mx.events::Request()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\events\Request.as: 75]
      at mx.styles::StyleManagerImpl()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\sty les\StyleManagerImpl.as:275]
      at _Main_FlexInit$/init()
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.preloaders::Preloader/timerHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx \preloaders\Preloader.as:515]
      at flash.utils::Timer/_timerDispatch()
      at flash.utils::Timer/tick()
      Most obliged,
      dp

        • 1. Re: Cannot resolve namespace qualified type ... in CSS selector ...
          GardenAway Level 1

          An update...

           

          In our case, we have the application in one pkg (A) and the styles in another (B).

           

          It appears that both the application (A) and the css (B) must both have the Flex 3 compatibility flag set to remove the warnings.

           

          As for the trap, it does not appear related to the warnings - the trap still occurs w/ the warnings addressed.

           

          dp

          • 2. Re: Cannot resolve namespace qualified type ... in CSS selector ...
            Flex harUI Adobe Employee

            What is the xmlns:mx= in the main app?  Are you also using

            library://ns.adobe.com/flex/mx?

            • 3. Re: Cannot resolve namespace qualified type ... in CSS selector ...
              GardenAway Level 1

              Thanks Alex,

               

              Yes, the header in the main app is xmlns:mx="library://ns.adobe.com/flex/mx"

               

              We've checked that all components use that namespace and the Flex 3 compatibility switch - that resolved the CSS warnings.

               

              As for the trap...

               

              We eventually resolved (worked around) the trap by creating a new main app and incrementally adding the content of the existing main app - there are only 66 lines - so it didn't take long.

               

              Curiously, the new app, even with the full 66 lines and same settings did not crash. The existing app, with all lines but the header removed, still crashed.

               

              All of the properties for the new and existing app are the same.

               

              So, I suspect something did not get set properly when the existing app was imported from FB4 Beta to FB4 GA.

               

              We're now back up and running using the newly created app rather than the imported app.

               

              Hopefully this can help someone who may stumble across the same challenge.

               

              Thanks again,

               

              dp

              • 4. Re: Cannot resolve namespace qualified type ... in CSS selector ...
                CatPoweredTM

                GardenAway wrote:

                 

                 

                So, I suspect something did not get set properly when the existing app was imported from FB4 Beta to FB4 GA.

                 

                dp

                 

                I had the same null argument problem as you did. Thank you for the insight above. It saved me a load of time.

                 

                Here are some more details:

                when I moved onto FB4GA from beta 2, the .actionScriptProperties file contained bunch entries like the following

                 

                <compiler>

                ...

                   <modifiedEntries>

                     <libraryPathEntry index="4" kind="3" linkType="4" path="${PROJECT_FR

                            <crossDomainRsls>

                              <crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl=

                              <crossDomainRslEntry autoExtract="true" policyFileUrl="http://fp

                            </crossDomainRsls>

                     </libraryPathEntry>

                     ....

                          about 3-4 more entries like the above

                   </modifiedEntries>

                   ....

                   <libraryPathEntry kind="1" linkType="1" path="${FLEXUNIT_LIB_LOCATION}/

                </compiler>

                 

                In eclipse, I went into project properties > Flex Build Path, deleted all the build path libraries/sdks and re-added only the SDK. The .actionScriptProperties file now has all the libraryPathEntries lines replaced with the following

                 

                    <libraryPath defaultLinkType="3">

                      <libraryPathEntry kind="4" path="">

                        <excludedEntries>

                          <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>

                        </excludedEntries>

                      </libraryPathEntry>

                    </libraryPath>

                 

                and the null argument problem went away