Articles

Flex Style Manager issue

In flex on May 16, 2009 by Luciano Bustos Tagged: ,

I’m working on a Flex App (customer.mxml) that load compiled CSS (swf files) at runtime. It load 4 css-SWF (icons.swf,defaults.swf, skins.swf and customer.swf), but when attempt to load the last one from themes/customer.swf it crash with an RTE.  :O!

This is issue merit about 5 hours of work and got me crazy trying to figured out where is the problem.
One of me colleagues, leonardo flores, figured out the issue. he said

the css has the same name as the application. Rename it and try.

And…. boila!!!. It’s work.

So If you have this RTE:

TypeError: Error #1034: Error de conversión forzada: no se puede convertir customer@185615c1 en mx.styles.IStyleModule.
at ()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\styles\StyleManagerImpl.as:828]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at ModuleInfoProxy/moduleEventHandler()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\modules\ModuleManager.as:1097]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at ModuleInfo/readyHandler()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\modules\ModuleManager.as:752]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::FlexModuleFactory/update()
at mx.core::FlexModuleFactory/timerHandler()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

Double check that the CSS doesn’t have the same name as the application, even if they reside in separates folders.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: