There is no need to unload the modules explicitly. I remove the components created for the application so it goes back to the original login state.
I know this is a old thread, but any one knows the answer please help me.
I have a modular application with blazeds.
Once I have many modules loaded in tab naviagtor. And when the user simple logout. I just close remove the tab navigator and bring the login box.
Everything works fine for the first time, when the user logs again without a refresh. The modules which was not loaded first time works fine. But the modules which was loaded first time throws random Type Error etc.
TypeError: Error #1034: Type Coercion failed: cannot convert flexlib.controls::PromptingTextInput@6152a851 to flexlib.controls.PromptingTextInput.
All my modules are in Current Domain. and I have a refrence for History mager, popup manager and imported all possible pakages in maim application.
I tried to unload modules on logout. but did not make any difference.
Hope you understand the problem.
Can you try add HistoryManager in your main application's action script:
private var hist:HistoryManager;
and add historyManagementEnabled="false" in your <Application > tab?
Last time i encountered similar problem as you and solved by this approach.
I added a refrence for PromptingTextInput in my main application, then i did not get this error, seems some code sharing problem between modules and current domain etc.
Thanks for your reply.