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: FlexModuleLoader and application style  (Read 12273 times)
mico
Jr. Member
**
Posts: 15


View Profile Email
« on: July 21, 2010, 04:39:40 »

Hello Fabrication users!

There is a shell application here with a module that is loaded with FlexModuleLoader
Earlier (before I figured out that Fabrication is now supported again) this module was loaded using default <ModuleLoader> component and everything works good. The problem now is that application style is not used in the module loaded with FlexModuleLoader now. There is a number of assets including font styles and images and they are not appled now. The loader is now created in command and then it is added to a container:
:
private function onModuleReady(e:ModuleEvent):void
{
trace('LoadSearchModuleCommand:onModuleReady');
var scm : SectionContainerMediator = SectionContainerMediator(facade.retrieveMediator(SectionContainerMediator.NAME))
scm.mainDisplay.search.addElement(FlexModuleLoader(e.target));
}
Logged
rafal.szemraj
Moderator
Full Member
*****
Posts: 41


View Profile WWW Email
« Reply #1 on: July 21, 2010, 04:58:48 »

Hi,

Which version of fabrication and Flex SDK you are using?
Logged
mico
Jr. Member
**
Posts: 15


View Profile Email
« Reply #2 on: July 21, 2010, 05:20:15 »

Flex SDK 4.1 and fabrication-0.7.3-flex.swc is used.
Also, Spark group is used as a container (scm.mainDisplay.search) for the FlexModuleLoader
« Last Edit: July 21, 2010, 06:54:54 by mico » Logged
rafal.szemraj
Moderator
Full Member
*****
Posts: 41


View Profile WWW Email
« Reply #3 on: July 21, 2010, 07:49:59 »

Hi,

Fabrication is compiled against Flex 4.0 so I don't know if this could be an issue, but I doubt it. Please, try 0.7.3.1. It has very important bug fix related to components and application domains. I'm not 100% sure, but this could be a reason why loaded module can't access style definitions from shell.
Logged
mico
Jr. Member
**
Posts: 15


View Profile Email
« Reply #4 on: July 21, 2010, 08:06:39 »

Thanks for the fast reply Rafal. Updating to 0.7.3.1 doesn't help and I can't check the Flex 4.0 version because this app doesn't work well with this sdk.
Logged
rafal.szemraj
Moderator
Full Member
*****
Posts: 41


View Profile WWW Email
« Reply #5 on: July 21, 2010, 12:29:26 »

Ok, is there any chance you to provide me with a little example of the issue?
Logged
mico
Jr. Member
**
Posts: 15


View Profile Email
« Reply #6 on: July 22, 2010, 12:58:53 »

Here is a small demo: www.slide.name/styledmodule.fxp
Logged
rafal.szemraj
Moderator
Full Member
*****
Posts: 41


View Profile WWW Email
« Reply #7 on: July 22, 2010, 12:10:45 »

Don't know why, but it seems to work this way http://www.flexthinker.com/2010/03/flex4-moduleloader-and-runtime-skins/. You have to remember to add ModuleLoader ( FlexModuleLoader ) to display list BEFORE you start loading module.

This is bad situation because in this case new FabricationModuleLoader and FabricationAirModuleLoader classes ( based on ModuleManager ) won't work properly.
Logged
Pages: [1]
Print