Actually having dug a bit deeper and got to the point of building 
swc's I have found that if you include a .css file in the swc it will 
automatically be included in the users application.

So create a "default.css" with the style for your components and 
compile it into the swc in the include files and when the library is 
added to a project the style will get into the user application.

So in theory no need for the static initializer to set default style.

--- In [email protected], "Michael Schmalle" 
<[EMAIL PROTECTED]> wrote:
>
> They don't use the defaults static initializer because the compiler 
is
> hardwired to include the defaults.css sheet at compile time.
> 
> If you did not include that css file every flex component would 
bomb and not
> work at all.
> 
> Unless you will rely on your end user adding your css defaults 
EVERY TIME
> they make an app with your component, use the static initializer.
> 
> If you notice, ALL charts use them(static initializers). This is 
because
> charts are 3rd party and adobe doesn't want people to have to 
include a css
> sheet or theme every time they need a chart.
> 
> Peace, Mike
> 
> On 6/17/07, reflexactions <[EMAIL PROTECTED]> wrote:
> >
> >   The docs recommend creating a static initializer to set a 
components
> > default style values.
> >
> > However scanning the framework source I cant find a single 
example of
> > an mx component that actualy does that.
> >
> > So what is the actual method they are using for this and why are 
they
> > using a different method (ie what are the benefits).
> >
> > tks
> >
> >  
> >
> 
> 
> 
> -- 
> Teoti Graphix
> http://www.teotigraphix.com
> 
> Blog - Flex2Components
> http://www.flex2components.com
> 
> You can find more by solving the problem then by 'asking the 
question'.
>


Reply via email to