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: SOLVED: Routed Notification triggers registered command 4 times  (Read 2783 times)
gunslinger4hire
Newbie
*
Posts: 2


View Profile Email
« on: March 30, 2009, 11:24:02 »

Hi...

Great work done with fabrication... Simplifies multicore apps a lot.

I have now a flex application with a lot of modules. and some modules are loaded by modules.
so i have a slight nested module setup.

example:

MainApplication -> loads -> Module A
                                      Module B -> loads -> Module C
                                                                   Module D
                                                                   Module E
                                      Module F

Now i try to route a notification from Module C to a command registered in the MainApplication. The notification gets handled by the command, but 4 times. Even when i use a mediator with respondTo<NOTIFICATION> the mediators respondTo Function is called 4 times.

I appreciate all help..
Thanks Oliver
« Last Edit: March 31, 2009, 04:57:35 by gunslinger4hire » Logged
gunslinger4hire
Newbie
*
Posts: 2


View Profile Email
« Reply #1 on: March 31, 2009, 04:57:18 »

Problem solved...

I thought i was clever and did not extend the SimpleFabricationCommand for the Modules StartupCommand. Instead i used the ModuleStartupCommand and extended this one.

Bad thing...
Logged
Darshan Sawardekar
Sr. Member
****
Posts: 85


View Profile Email
« Reply #2 on: April 01, 2009, 08:15:21 »

@gunslinger4hire

Glad you got it solved. I one of the things that might help with lots of module is to use module groups. This is present in 0.6 but not documented well right now. The idea is to assign a group name to a module. So routed notifications stay with a group, similar to created a subnet on lan. See this post[1] for more.

peace,
darshan

[1] : http://forums.puremvc.org/index.php?topic=874.msg4000#msg4000
Logged
Pages: [1]
Print