3 Replies Latest reply on Jun 11, 2008 9:25 AM by Guilherme_Blanco

    Problem with loading modules


      I started to touch Flex this weekend and I read something on manual. My company is evaluating Flex to built a huge application and we already built some prototypes using ExtJS and Bindows. Now it's time to build it on Flex and compare the results.

      Since this will be a extremely HUGE application, I had to move to a modular application.
      My first attempt is the login. I want to fetch server and if user is not logged in, load the core.layout.LoginWindow module and display it; otherwise, load the module core.layout.MainInterface.

      This sounds really simple and I decided to research about possible variations before start. To prevent having variables floating around, we chose ModuleManager as our loader and we found that debug module should have a "-debug" after the path and before file extension.

      I created LoginWindow and MainInterface easily. The issue happens when I wanted to load the module.
      It has 2 behaviors here:

      1) It does not laod the module and triggers IO_Error. I'm unable to catch this and I only discovered it debugging the application. I thought it may be because of "-debug", removed and the issue continues;
      2) Sometimes it loads the module, debug shows me that and even create and call dispatchEvent. But my code is never notified. So, it loads the module but doesn't trigger any event.

      I attached 2 pastebins, one for the mxml and the other for as file.
      MXML: http://pastebin.com/mb918334
      AS: http://pastebin.com/m509285d1

      I have until monday to show my prototype running. Since this is a non-blocking issue, I'll work on other parts and wait for a response. I fight against this for too much time yesterday.... =\

      PS: Also, I found one bug in SDK core code. Where do I report the fix? For those that are interested, tabIndex is never assigned when you dynamically add new tabs to a tabnavigator. This is a quick fix.

      Thanks in advance,

      Guilherme Blanco