flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kessler CTR Mark J" <mark.kessler....@usmc.mil>
Subject RE: Odd issue with unused namespaces in style blocks
Date Thu, 14 Feb 2013 11:07:36 GMT

   We ran into some interesting issue like that when we first cut over to spark using the
CSS files shortly after it was released. Some of the components came up blank like they were
not using their default skin files.  So we either used our custom skins or  made sure they
were assigned properly to components in a module.  It was made worse when I would include
a sizeable CSS file in the main application and any CSS in the main application that wasn't
used it tossed... which meant the module couldn't use that style.  Sooo for us it meant....

1.  Make sure you have a skin (custom or default) assigned for the trouble makers.  Can assign
them in CSS.

2.  Any modules not able to load the CSS styles, you can add an empty component class in your
main application to make sure it doesn't toss out those styles.   Like in a script section
for your application.

    import mx.controls.DateField;
    import spark.components.SomeComponent;

    private var cssWorkAround:Array = [DateField, SomeComponent];


-----Original Message-----
From: Justin Mclean [mailto:justin@classsoftware.com] 
Sent: Wednesday, February 13, 2013 11:16 PM
To: flex-dev@apache.org
Subject: Odd issue with unused namespaces in style blocks


Run into a very odd Flex issue today.

Some time ago in a large application we had cleaned up all of the styles and moved most to
a central location, however a few style blocks were left about with local styles still containing
the spark namespaces.

	@namespace s "library://ns.adobe.com/flex/spark";
	.hoverStyle {
		symbolColor: #1E78D2;
		rollOverColor: #EDF5FF;
		color: #1E78D2;

Using the halo theme the application worked correctly but using the spark theme sometimes
and seeming randomly item renderers would show up totally blank. Managed to finally find a
sequence of steps that causes the issue to happen every time and it seem the fix to this issue
was to remove the unused namespaces!

	.hoverStyle {
		symbolColor: #1E78D2;
		rollOverColor: #EDF5FF;
		color: #1E78D2;

Anyone run into an issue like this or have any idea to why having an unused namespace would
cause item renders to randomly show up blank?

I've not be able to reproduce the issue in a small sample of code but thought I should email
the list just in case anyone run into this issue or knows why this might occur.


View raw message