Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: ModuleEvent.READY not firing  (Read 9524 times)
krange
Newbie
*
Posts: 8


View Profile Email
« on: March 31, 2009, 09:48:51 »

Hi,

I just started on a test Multi-Core and Fabrication Flex project ( been using Standard for a while so I figured it was time to migrate ) and I have been following some of the examples and tutorials online. Sometimes I notice when I load my modules, the ModuleEvent.READY doesn't fire. If I try to load it a second time, the module then initializes and the READY event fires.

Anyone else experience an issue like this?

Any help would be greatly appreciated
Thanks,
Kris

Here is how I am loading my modules. I've also tried using ModuleManager but I get the same effect.

:
var moduleLoader : FlexModuleLoader = new FlexModuleLoader();

var id : String = UIDUtil.createUID();
moduleLoader.id = id;
moduleLoader.url = "/SimpleModule.swf";
moduleLoader.router = this.applicationRouter;
moduleLoader.defaultRouteAddress = this.applicationAddress;

moduleLoader.addEventListener(ModuleEvent.ERROR, handleModuleError );
moduleLoader.addEventListener(FabricatorEvent.FABRICATION_CREATED, handleModuleCreated );
moduleLoader.addEventListener(FabricatorEvent.FABRICATION_REMOVED, handleModuleRemoved );
moduleLoader.addEventListener( ModuleEvent.READY, handleModuleReady );
moduleLoader.addEventListener( ModuleEvent.PROGRESS, handleModuleProgress );
moduleLoader.addEventListener( ModuleEvent.SETUP, handleModuleSetup );

moduleLoader.loadModule();

This is the output, which looks like its not loading completely.

:
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=0 bytesTotal=327580]
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=16384 bytesTotal=327580]
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=16384 bytesTotal=327580]
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=32768 bytesTotal=327580]
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=32768 bytesTotal=327580]
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=49152 bytesTotal=327580]
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=49152 bytesTotal=327580]
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=65536 bytesTotal=327580]
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=65536 bytesTotal=327580]
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=81920 bytesTotal=327580]
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=81920 bytesTotal=327580]
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=98304 bytesTotal=327580]
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=98304 bytesTotal=327580]
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=114688 bytesTotal=327580]
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=114688 bytesTotal=327580]
[ProgressEvent type="progress" bubbles=false cancelable=false eventPhase=2 bytesLoaded=131072 bytesTotal=327580]
[SWF] /SimpleModule.swf - 776,145 bytes after decompression


Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: April 01, 2009, 03:51:07 »

I can't really advise you where Fabrication is involved.

There is a convenience board for Fabrication on these forums under the Public Tools, Apps and Demos board, and Darshan, the author of that framework answers questions there.

Personally I do not advocate diving directly into Fabrication until you understand and are comfortable with MultiCore.

No disrespect is meant to Darshan and his team, but Fabrication is still being developed and bugfixed, and has incompatibilities with several utilities and therefore I do not advise migrating critical apps to it.
MultiCore itself is fully unit tested and has been used by myself in the field under extremely demanding conditions, and so I fully support and advocate it.   

-=Cliff>
Logged
Shua
Newbie
*
Posts: 4


View Profile Email
« Reply #2 on: August 28, 2009, 11:58:54 »

I believe the issue above was due to a bug in the flex SDK as noted here: http://bugs.adobe.com/jira/browse/SDK-14669

I was having the same issue and updated my SDK to 3.4.* and it works fine now.
http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK

Peace
Shua
Logged
Pages: [1]
Print