PureMVC Architects Lounge

PureMVC Manifold => MultiCore Version => Topic started by: krange on March 31, 2009, 09:48:51



Title: ModuleEvent.READY not firing
Post by: krange 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




Title: Re: ModuleEvent.READY not firing
Post by: puremvc 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>


Title: Re: ModuleEvent.READY not firing
Post by: Shua 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