Thanks for your help Alex, so while parsing though the link report xml I SHOULD NOT see any references to the modules? That will help. Also, as far as the size issue which was suggest to me before, I started to add minHeight and minWidth to all the pieces and it didnt seem to help at all.

On 8/5/2010 1:09 AM, Alex Harui wrote:

Well, you don’t have any references in the code you posted, but it could be somewhere else. Open the link-report, make sure it contains a script for the main app’s .mxml file and then see if the string name of a module is in the file. If it is, that’s trouble. The reason for the .mxml file check is that if you are using Flash Builder and module projects, the module link-report overwrites the app’s link-report. I generally do this by hand.

Another possibility is that some size calculation is now off for some reason and a bad value is being passed in to drawRoundRect. If you can catch the scenario in the debugger you may get more info as to what is up.


On 8/4/10 5:10 PM, "Wally Kolcz" <[email protected] <[email protected]>> wrote:






    Thank you for your advice. I did that, but I have no idea what i
    am looking at. As you can see, I have no references to the modules
    from the main application so I still have no idea why its throwing
    that error. Where can I find more information on how to read it?

    On 8/4/2010 5:16 PM, Alex Harui wrote:




        Use a link-report to make sure none of the classes in the
        module are being liked into the main app.  Lots of folks have
        been doing things like:

        Var myModule:MyModule = MyModule(moduleInfo.factory.create()

        Instead of using an interface.  This actually links MyModule
        into the main app, defeating the purpose of modules, and in
        Flex 4, will mess up the style lookup.


        On 8/4/10 4:24 AM, "Wally Kolcz" <[email protected]
        <[email protected]>> wrote:








            Just kidding..kinda.. After googling a lot of combination
            of  terms, I
            was able to finally get some answers regarding problems
            that seem to
            come up while trying to develop a modular application,
            but, sadly, I am
            not 100% sure what the Adobe person was talking about. The
            error always
            centers around the mysterious error: 'ArgumentError: Error
            #2004: One of
            the parameters is invalid. at
            flash.display::Graphics/drawRoundRect()...'

            More often than not it revolves around a <s:Button> but I
            just got the
            same error on a layout that has no buttons. This time it
            seems to
            revolve this time be a <s:BorderContainer> since when I
            swapped it out
            from a <s:Group> (which worked fine) it started throwing
            errors.

            My question to the group is how to manage loading Modules
            from the
            application and not throw errors? Why does this happen
            when it never did
            it in 3.4. I read it has to do with Style references with
            the main
            application, but, again, I don't know exactly what that
            means or how to
            fix it.

            Since it seems to come up in the other posts I could find,
            I have an
            Application that, based on a log in and the user's
            'accountType', loads
            a modules for that user's portal type. I use this to load
            the modules,
            which seems to be pretty stock, and it works fine for the
            loading and
            adding of different modules throughout the application.:

            private function loadModule(path:String):void {
             modLoader = ModuleManager.getModule(path);
             modLoader.addEventListener(ModuleEvent.ERROR,
            modErrorHandler);
             modLoader.addEventListener(ModuleEvent.READY,
            modReadyHandler);
             modLoader.load();
             }

            private function modErrorHandler(e:ModuleEvent):void {
             Alert.show("Module did not load correctly", "Module
            Loading Error");
             }

            private function modReadyHandler(e:ModuleEvent):void {
             this.removeAllElements();
             this.addElement(modLoader.factory.create() as
            IVisualElement);
             }

            Any ideas why I get that error when loading modules? How
            can I fix it?
            Does ANYONE know why that error is thrown?








--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui <http://blogs.adobe.com/aharui>


Reply via email to