PureMVC Architects Lounge

Announcements and General Discussion => General Discussion => Topic started by: meatnugget on April 07, 2009, 05:56:20



Title: MultiCore load module into another module issue
Post by: meatnugget on April 07, 2009, 05:56:20
Hi,

I'm having a frustrating problem with loaded modules:

In my application I load modules into other modules at run time. All modules are loaded using the module manager and everything loads fine. The problem happens with any outbound notifications originating from the modules loaded at run time into another module - they are being sent twice.

If the same module is loaded into the main shell instead of into another module the notifications behave as expected.

I know there isn't much info to go on - and no source code, but if it sounds familiar I'd really appreciate if anyone has experienced a similar problem and found a solution.

Thanks!


Title: Re: MultiCore load module into another module issue
Post by: puremvc on April 08, 2009, 12:18:59
That's strange behavior, to be sure.

However, you shouldn't be sending 'outbound' notifications between modules. If you want to send info between modules, you should use the Pipes utility, where you can send strongly-typed messages.

Why? Notification constants may be duplicated in different modules, with different meanings. Sure you may control all of the notification constants in your closed application, but in an application which may load third party modules may not have any control over notification namespace. A best practice must include all reasonable uses, so this possibility governs the inter-module communication practice.

-=Cliff>