2 Replies Latest reply on Jul 27, 2011 7:59 AM by flairjax

    Spark button losing skinClass

    flairjax Level 1

      I have a bug where a spark button is not getting updated with its SkinClass.

       

       

      s|Button {

          fontFamily: Arial;

          fontSize: 12;

          fontWeight: bold;

          skin-class: ClassReference('com.skins.buttons.MyGenericButtonSkin');

      }

       

      I have a component that has three buttons in it. "Previous", "Next", and "Cancel", think wizard/step through. As the user is using the the component, everything works fine up until about the third screen when you click "Next" the "Next" button shows the correct skinClass/style and then flashes and defaults to the default spark skin.

       

      The button does have the enable and label bound to two getters. So as a test I removed those and hardcoded both and the issue still remains. As another test, I copied the "Next" button so now I have two hardcoded "Next" buttons, both calling the same CLICK eventHandler. Now whichever "NEXT" button you click, which takes you to the next section, shows the default spark button skin in the next section of the wizard, not the custom skinClass.

       

      How or why would Flex not pick up its SkinClass, which is assigned via an external library project (aka only CSS and custom components are in a seperate library).  Also we are using RSL's if that matters?

       

      Also, if you click any of the other buttons, "Previous" or "Cancel", there styles are shown correctly.