Hehe, thanks for the reply Gordon. I wasn't referring to design view
problems as I don't use it either. I was referring to the fact that it
seems you are required to put a global selector in your defaults.css
that includes styles for an untold number of components if you want
the SWC to be compatible with Flex 2.x. as described here:
http://tech.groups.yahoo.com/group/flexcoders/message/99374. Is it
trying to use the defaults.css from my SWC to style the whole app?

I am not trying to create a whole new theme or anything, I just want
the styles for my component included, so I don't want to compile
repeatedly until I figure out exactly what has to be in my global
selector.

As for examples in the framework, I've had a hard time finding ones
that map to my scenario well as most of the style names specified in
other style selectors simply get applied to a subcomponent. I would be
more than happy to follow your lead if you can point me to some good
examples to reference.

Thanks,
Ben


--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> OK, I have to eat crow. : )
>  
> My fellow team members tell me that Flex Builder's design view doesn't
> process the default.css file in 3rd party SWCs. I wasn't aware of this
> because I'm on the SDK team, not the Flex Builder team, and when I use
> Flex Builder I don't use design view.
>  
> I'm going to go slink under my desk and let others opine on how to do
> styles correctly in a way that will make Flex Builder happy.
>  
> Gordon Smith
> Adobe Flex SDK Team
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Gordon Smith
> Sent: Wednesday, January 23, 2008 1:43 PM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] Seriously, what is the 'right' way to do
> default styles?
> 
> 
> 
> > the lack of definitive info on this topic is pretty amazing to me
>  
> Ben, what could be more definitive than the approach that the Flex SDK
> team takes for its own components? You don't have to follow our lead,
> but I still think it counts as best practice.
>  
> Flex framework SWCs, such as framework.swc and airframework.swc, contain
> a defaults.css file, and this file references embeddable assets that are
> also in the SWC. The "host of problems" you are referring to (and I
> don't understand what they are) can't be any worse than those Flex
> developers encounter simply by using the standard Flex SWCs.
>  
> - Gordon
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of ben.clinkinbeard
> Sent: Wednesday, January 23, 2008 12:21 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Seriously, what is the 'right' way to do default
> styles?
> 
> 
> 
> OK, the lack of definitive info on this topic is pretty amazing to me
> so I would like to help get something out there once and for all. The
> problem to which I am referring is how to define default yet
> overridable styles for custom components, including times when those
> styles require embedded assets. This has been discussed before, but
> the threads seem to endorse differing methods and neither provides
> much in the way of concrete examples.
> 
> http://tech.groups.yahoo.com/group/flexcoders/message/98546?threaded=1&p
> =8
> <http://tech.groups.yahoo.com/group/flexcoders/message/98546?threaded=1&;
> p=8> 
> http://tech.groups.yahoo.com/group/flexcoders/message/94547
> <http://tech.groups.yahoo.com/group/flexcoders/message/94547> 
> 
> I will use my personal efforts as an example here because its fairly
> complex and I think if we can define a solution for it then most other
> scenarios will be covered in the process. I have a component,
> MDIWindow. I want its style to point to other styles (as seen in Panel
> with titleStyleName and various other places in the Flex framework)
> with properties named focusStyleName and noFocusStyleName. Those
> "second-level" styles will then embed assets and contain a
> ClassReference directive. The end user should be able to define a
> MDIWindow style in their CSS but should also be able to specify
> styleName on an instance and have it point to alternate styles (all
> MDIWindow instances should not have to be styled the same).
> 
> The classConstruct() static method + AS and defaultFactory()
> (mentioned by Alex above as probably the best option) works well for
> defining the MDIWindow type selector styles but falls short of
> supporting the styleName path since its static and cannot reference
> instance properties.
> 
> The CSS approach (recommended by Gordon above) has issues when it
> comes to embedding assets in the resulting SWC (I think) unless you
> use the defaults.css approach, but that comes with its own host of
> problems (http://tech.groups.yahoo.com/group/flexcoders/message/99374
> <http://tech.groups.yahoo.com/group/flexcoders/message/99374> ).
> 
> I (and many others I think) are simply looking for an approach that is
> flexible, compatible with Flex 2.x and preferably has the "recommended
> by Adobe" stamp. I figure at the very least maybe we can get two of
> the SDK engineers to duke it out (Deepa, you're in charge of
> photgraphing), and hopefully whoever can still use a keyboard
> afterwards will post a wonderfully detailed diatribe on the "right"
> way to do default styles.
> 
> Thanks!
> Ben
>


Reply via email to