On 12/16/14, 9:36 PM, "DarkStone" <[email protected]> wrote:
>Hi Alex,
>
>Why this needs to be fixed is simple:
>
>1. Using MySkinnableComponent.setStyle("skinClass", SkinA) to apply an
>initial skin is ok.
>
>2. Then using MySkinnableComponent.styleName = "skinB" won't work, the
>skin won't change.
>
>The styleChanged() function in SkinnableComponent doesn't handle this
>scenario correctly, that's why we need to override the styleName setter
>function to fix this.
I’m wondering why the styleChanged() function can’t be changed to handle
this scenario correctly. There are other ways to change skinClass, like
setting it directly in a CSSStyleDeclaration or by loading a Style module.
I would expect them all to call styleChanged() and the right thing to
happen.
Thanks,
-Alex