Leaf names are used in style look up so packages don't differentiate and you can get collisions.
You can muck with getClassStyleDecls, but your user will have to use different selector names other than Label which can lead to confusion. -Alex ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of reflexactions Sent: Tuesday, July 10, 2007 1:39 AM To: [email protected] Subject: [flexcomponents] Inheritance and Class Styles Issues I have two classes A and B, B extends A. Both A and B define class level style default factories. When I instantiate B it has the defaults for both A and B. Fine so far....now the problem Both A and B classnames clash with existing framework classes. No problem they are in seperate packages and in different namspaces in mxml so everything works fine ... EXCEPT ... for styles. UICompoent.getClassStyleDeclarations walks the class chain looking for style declarations. It correctly realises that mx.controls.Label is different from com.me.Label and ask the StyleManager for styles using the full class name. However StyleManager.getStyleDeclaration simply rips off everything except the last part and internally looks for "Label" only, hence the problem with classname clashing. The only solution I can think of is to override getClassStyleDeclarations so that I can change the selector that is passed to the StyleManager so that it cant screw with it, ie use an "internal" classname name or something. Before I do this I want to make sure that I am correctly understanding how this works and that I am not missing something obvious. Oh and btw b4 someone suggests it renaming the classes so they dont clash is not an option in this case. tks
