7 Replies Latest reply on Jul 8, 2010 9:00 PM by mlabriola

    4.1 Beta 2 namespace issues?


      I'm trying out Beta 2 as an upgrade from 4.0 and I'm finding that I'm having to use a different namespace than previously specified and what's specified in the Wiki.


      Old: http://www.adobe.com/2009/flexUnitUIRunner


      New: org.flexunit.flexui.*


      This is the only change I was required to make when switching versions. Without this change I get:


      Could not resolve <flexUnitUIRunner:TestRunnerBase> to a component implementation.    MyTests.mxml    /MyTests/src    line 42    Flex Problem

      I've found several other threads where folks have had a similar problem with a similar solution.  It seems as if the namespace information isn't included in the .swc file because the only way I can find it is through the package namespace.

        • 1. Re: 4.1 Beta 2 namespace issues?
          mlabriola Level 4

          Are you building the code for the UIListener yourself?


          It sounds an awful lot like Flash Builder lost the namespace setting for the UIListener project. Under the compiler options for that project you should see:





          defined for the manifest.


          Our build system actually uses the namespace in its build files, that is the reason I am first asking if it could be something local to your system. I am also asking because I have seen Flash Builder lose this namespace more than once but I have never been able to track down what happened to file a proper bug report.


          Let me know,


          • 2. Re: 4.1 Beta 2 namespace issues?
            edthorne Level 1

            I am not building any of the FlexUnit code myself.  I'm using the SWC files that are in the Beta 2 download for Flex 4.  I've simply replaced the Flex Unit 4.0 SWCs I was using with Flex 3 with the new ones from Beta 2 for Flex 4.


            It would appear that another user had a similar problem in this thread and simply replaced the turnkey project's SWCs with the ones from FlexUnit 4.0.

            • 3. Re: 4.1 Beta 2 namespace issues?
              mlabriola Level 4

              I am downloading the zip presently...


              I can only assume something went wrong during packaging of this, but I will post here as soon as I understand the issue.



              • 4. Re: 4.1 Beta 2 namespace issues?
                mlabriola Level 4

                I am going to need more help trying to reproduce this. Please tell me exactly which download for which sdk you grabbed. Also, which Flex SDK are you building against?


                Here is what I did just now.


                I created a new project called TestMe using Flex SDK 3.5

                I downloaded from this page http://www.flexunit.org/?page_id=14 the link that said Flex Based (3.5 SDK)

                When I open the zip file, I have a bunch of swcs... in particular, the UIListener swc I downloaded has this filename/version info:




                I copied all of the swcs from this zip into the libs folder of TestMe.

                I created a TestCase called MyTestCase with one method.

                I created a main application using the namespace that looks like this:


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



                  creationComplete="runMe()" xmlns:adobe="http://www.adobe.com/2009/flexUnitUIRunner">





                      import org.flexunit.listeners.UIListener;


                      import org.flexunit.runner.FlexUnitCore;



                      private var core:FlexUnitCore;



                      public function runMe():void {

                        core = new FlexUnitCore();

                        core.addListener( uiListener );

                        core.run( MyTestCase );





                <adobe:TestRunnerBase id="uiListener" width="100%" height="100%"  />




                Everything compiles and runs correctly and I get the UI to report results. Can you go through any differences in our setup with a fine tooth comb and help me understand what is different?



                • 5. Re: 4.1 Beta 2 namespace issues?
                  edthorne Level 1

                  I'm using the 4.0 SDK download here: http://www.flexunit.org/releases/flexunit-4.1.0-beta2-flex4.0.zip


                  I added the following to my project's compile path:






                  I get the same result using SDK 4.0 from the command line using ant and SDK 4.1 in the latest version of Flash Builder.

                  • 6. Re: 4.1 Beta 2 namespace issues?
                    mlabriola Level 4

                    Okay, thank you so much for your help and continued dialog. I have replicated the issue with the 4.1 b2 4.0 SDK builds. The 3.5 SDK builds do not exhibit this behavior. I am not yet sure if the issue is build time or a bug in the way something is linking, however, here is a workaround for the moment.  If you pull the flexunit-uilistener-4.1.0-beta2.18-sdk3.5.0.12683.swc out of the 3.5 build and use the remainder of the 4.0 SDK builds all works fine.


                    That is because the UIListener is still mx components and, in 4.0, we build it with MX compatibility. So, regardless of the SDK, it should pretty much be the same bits.


                    We will get this corrected as soon as possible, but I verified this works.


                    Thanks again,


                    • 7. Re: 4.1 Beta 2 namespace issues?
                      mlabriola Level 4

                      For anyone who wishes to monitor this issue, there is now a jira bug for it: