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

I just wrote a novel in response to this but decided to delete it.

Bottom line, have you tested this, with the default.css ? What you are
coming up witt will not work. There is no theory when it comes down to DOES
it work or DOESN'T it work.

When you include a a css file in a library, all it does is add it to the
zip. When you set that swc in a build path, the flex compiler doesn't know
what the hell to do with your css, until you specify a -theme compiler
argument that says treat this as the application's defaults.

And you can read about a year ago when I talked with flex engineers about
styles and they said explicitly, do not name your css file defaults, it has
to be something original.

Peace, Mike

On 6/20/07, reflexactions <[EMAIL PROTECTED]> wrote:

  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] <flexcomponents%40yahoogroups.com>,
"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'.
>




--
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