Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Welcome, Guest. Please login or register.
April 28, 2017, 10:22:12 PM
Home Help Search Login Register
News: ATTENTION: Spambots must die! Humans must visit http://contact.futurescale.com to request forum access.
Pages: [1]
Print
Author Topic: FlexModuleLoader and application style  (Read 5287 times)
mico
Jr. Member
**
Posts: 15


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

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:
Code:
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
« Reply #1 on: July 21, 2010, 04:58:48 AM »

Hi,

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


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

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 AM by mico » Logged
rafal.szemraj
Moderator
Full Member
*****
Posts: 41


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

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
« Reply #4 on: July 21, 2010, 08:06:39 AM »

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
« Reply #5 on: July 21, 2010, 12:29:26 PM »

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


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

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


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

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
Jump to: