[flexcoders] Re: Copy or enumerate a CSSStyleDeclaration? (Flex 3.4)

2009-11-19 Thread graham.t...@rocketmail.com

How did you resolve this without access to the protected 
CSSStyleDeclaration.overrides property?


--- In flexcoders@yahoogroups.com, droponrcll amyblankens...@... wrote:

 
 
 --- In flexcoders@yahoogroups.com, droponrcll amyblankenship@ wrote:
 
  I have a custom class that extends Canvas.  I'd like this class to have the 
  default styles used by Canvas, plus my own default styles.  So I want to 
  get the Canvas CSSStyleDeclaration and copy its properties to a new 
  CSSStyleDeclaration used by my own component (then add my own stuff).
  
  I can't see a way to walk through the CSSStyleDeclaration and copy its 
  properties or to separate out the instance so I don't affect all Canvases 
  in the project.
 
 Never mind.  Found it in the code to CSSStyleDeclaration.





[flexcoders] Re: Copy or enumerate a CSSStyleDeclaration? (Flex 3.4)

2009-11-19 Thread Amy


--- In flexcoders@yahoogroups.com, graham.t...@... tony.gra...@... wrote:

 
 How did you resolve this without access to the protected 
 CSSStyleDeclaration.overrides property?

IIRC, if you look at the code to CSSStyleDeclaration, you can see how to use 
the factory property to create an object that has the properties that are set 
up by the aggregate of the style declarations that refer to your component in 
some way.

Note that the defaultFactory you see in the help examples is NOT what you want 
to look at.  defaultFactory is the css properties that get attached to an 
instance defined in MXML in the faux attributes that point to style properties.

BUT...I think I ultimately concluded that the inheritance I was trying to force 
basically just happens automagically, because the code I worked out isn't in 
the project anymore :)

HTH;

Amy



[flexcoders] Re: Copy or enumerate a CSSStyleDeclaration? (Flex 3.4)

2009-10-23 Thread droponrcll


--- In flexcoders@yahoogroups.com, droponrcll amyblankens...@... wrote:

 I have a custom class that extends Canvas.  I'd like this class to have the 
 default styles used by Canvas, plus my own default styles.  So I want to get 
 the Canvas CSSStyleDeclaration and copy its properties to a new 
 CSSStyleDeclaration used by my own component (then add my own stuff).
 
 I can't see a way to walk through the CSSStyleDeclaration and copy its 
 properties or to separate out the instance so I don't affect all Canvases 
 in the project.

Never mind.  Found it in the code to CSSStyleDeclaration.