PureMVC Architects Lounge

Announcements and General Discussion => Fabrication => Topic started by: marks416 on February 26, 2009, 01:17:34



Title: "Router was not set on the module" error
Post by: marks416 on February 26, 2009, 01:17:34
Hi,

I am doing a module applicatoion with Fabrication.

I follow the url:

http://code.google.com/p/fabrication/wiki/UsingModules

and I have added the following statement to the moduleLoader instance

moduleLoader.router = applicationRouter;
moduleLoader.defaultRouteAddress = applicationAddress

What I have to do with module to fix the error.

Thanks

Mark


Title: Re: "Router was not set on the module" error
Post by: marks416 on February 26, 2009, 02:36:52
Hi Darshan,

Please take a look the attached flex file that exported from flex builder. I am not sure why I get the runtime error.

Thanks

Mark

Attached file:
http://rapidshare.com/files/202955604/mdi3.zip.html


Title: Re: "Router was not set on the module" error
Post by: Darshan Sawardekar on March 01, 2009, 12:15:43
The problem is with the FlexModuleLoader usage. The applicationRouter is not set on the module loader. However the applicationRouter is created after creationComplete in Fabrication. So you will have to use it with the actionscript syntax and after fabrication is ready. I suggest doing this in/via the startup command.

peace,
darshan


Title: Re: "Router was not set on the module" error
Post by: marks416 on March 02, 2009, 09:21:18
The problem is fixed after I remove mx:ModuleLoader in mxml.

Thanks

Mark