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 / Re: updating notification interest list after mediator registration on: February 21, 2011, 01:25:30
We are definitely going down path B, path A is not a requirement. Setting up an Interface and transforming the notifications into our own Messages and vice versa for their communication to our application. We don't want them to know about PureMVC even if they happen to use it themselves. Regardless, there is a forced barrier there.

I guess the best is, like you say, mediate when the SWF knows all the notifications it is interested in...

Thanks,
Kris
2  Announcements and General Discussion / General Discussion / Re: updating notification interest list after mediator registration on: February 16, 2011, 03:11:12
Hi Cliff,

Thanks for responding. I understand the multicore/pipes setup and have used it many times before. My fault for not stating my question a bit clearer.

The use case is that our clients will be creating a SWF (most likely NOT a PureMVC application) that will need to respond/send notifications to our PureMVC multicore application. Now, of course if they aren't in PureMVC they can't directly send/receive notifications. So instead, we will be creating a wrapper PureMVC module which will provide this connection through an interface we have set up. This interface that their SWF will need to implement will at the very least provide us a method similar to PureMVCs listNotificationInterests():Array. That way we know find out what notifications their SWF is interested in when the wrapper mediator is registered (aka, similar to the normal PureMVC setup).

I guess my question is, is there a way to add notification interests more dynamically as their SWF may not know once it "load completes" all the notifications it will need. We could force them to be more static and maybe that is the solution, just trying to see if there is a way to provide them more flexibility.

Thanks again for responding and reading my ramblings :)
Kris
3  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?
4  PureMVC Manifold / Standard Version / Re: Using the obj-c port with X-Code 3.23 on: September 14, 2010, 05:22:53
They might need a re-compile again for Xcode 3.24 now as I'm getting similar errors with the latest version...
5  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

6  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


7  Announcements and General Discussion / General Discussion / Re: preloader for the application and puremvc startup on: March 22, 2009, 08:56:17
You can display it again, but I don't think you can keep flex from removing it.

-=Cliff>

Yup, Flex will try to remove it from the display list once the Flex Application initial load has completed. You can get around this by creating a new Sprite and have it implement IPreloaderDisplay and set that class as the preloader in your Application Class. Then delay the Event.COMPLETE that gets fired from it until everything in your PureMVC application has loaded. There are a few tricky things with this solution, but it allows you to use your own Preloader and keep it until you want it removed ( ie. once all your init views have loaded ). 

I use a home grown PreloadManager that keeps track of different phases ( Flex Application Intialize, Data Load, View Load, etc ) and and my preloader listens for events from that to know when the entire load has completed.

Theres a bunch of good articles ( just google "flex custom preloader" ) that show you how to do the IPreloaderDisplay setup.

Thanks,
Kris

8  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]