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

Show Posts

| * |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / General Discussion / updating notification interest list after mediator registration on: February 16, 2011, 08:10:06
I will be adding support to our existing PureMVC application where we will be loading in a module (not-nessesarily puremvc) built by our customers. In addition, one of the features they want to add is the ability for the custom module to listen for notifications from our shell application as well as send out notifications to our shell. To do this will be creating an interface between the two and passing information to and from (just like a view would normally).

The question then arrises in my head, what happens if they want to listen to a notification at some future point in their module (not at registration). Only the notifications they could register at startup would be available to them. This seems like a highly likely use-case in this scenario for us.

I've gone through the PureMVC classes and it looks as if from within a mediator, you can't update it's notification list after registration. I've done a search through the forums as well but none that really give any guidance in this case.

Anyone have ideas?
2  Announcements and General Discussion / Fabrication / questions about moduleAddress and parent access on: June 01, 2009, 02:26:45
Hi,

First of all great work on the fabrication utility. I have it setup in a few of my projects and it's been extremely useful. In one of my projects  we load in multiple modules, and those modules then load in other modules as well (see diagram below).

Shell --> Module A     --> Module C
                              --> Module D
                              --> Module E
                              --> Module F

       --> Module B      --> Module C
                              --> Module D

       ---> Module ....

I have two questions:

1. I have set it up so that currently the shell or module that is loading a module in passes it it's moduleAddress class and instance name. This way the module loading in can get direct access to the parent it was loaded from. Since a parent can be anything from the shell to a few different types of modules, I didn't see any other way of getting this information. Is this the correct way to go about this?

2. I've also noticed that the FlexModuleLoader instance isn't providing me with the modules moduleAddress information. It always seems to show up null. I can grab other information from the loader, but just not the moduleAddress. So if I need to go the other direction and send information into the specific module instance, I can't grab the information correctly. Any initial thoughts as to why this might be? Is there another way I should go about this? Attached is my code for loading the module ( commented out some that was extraneous )....

:
var loader : FlexModuleLoader = new FlexModuleLoader();

loader.url = moduleVO.moduleSwfUrl;
loader.id = moduleVO.id;
loader.router = applicationRouter;

if ( moduleVO.moduleGroup != null ) {
loader.moduleGroup = moduleVO.moduleGroup;
loader.defaultRoute  = moduleVO.moduleGroup;
} else {
loader.defaultRouteAddress = applicationAddress;
}

// Event listening code here...

// Save loader reference here...

loader.loadModule();

Thanks,
Kris

3  PureMVC Manifold / MultiCore Version / ModuleEvent.READY not firing 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


4  Announcements and General Discussion / General Discussion / custom notification on: October 13, 2008, 03:13:50
Hey,

I'm looking at creating a custom notification. I've got my mediator and notification classes setup, but running into an issue implementing it in a command. I was thinking the best way to do this would be to override execute with a notification that was a subclass of INotification but no love for this process. Whats the best way of going about this? Right now I'm just casting the notification in my execute method as my subclass but this doesn't seem "right".

Thanks,
Kris
Pages: [1]