3 Replies Latest reply on Oct 21, 2011 3:13 PM by Flex harUI

    Problem with spark component skins

    seb.dsf

      Hi,

       

      I started a new project with Flex 4.5.1 SDK and I have a problem with some components like s:RadioButton or s:CheckBox. When the component is rendering I have an error. Flex can't find the skin of the components. There is no problem with other components like s:Button or s:Label. Here the error (in french) :

       

      Error: Apparence de Main0.ApplicationSkin2._ApplicationSkin_Group1.contentGroup.appModule.AppModule7.Skinnabl eContainerSkin8.contentGroup.HomeView10.CheckBox14 introuvable.

          at spark.components.supportClasses::SkinnableComponent/attachSkin()[E:\dev\4.5.1\frameworks\ projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:698]

          at spark.components.supportClasses::SkinnableComponent/validateSkinChange()[E:\dev\4.5.1\fra meworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:443]

          at spark.components.supportClasses::SkinnableComponent/createChildren()[E:\dev\4.5.1\framewo rks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:406]

          at mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7624]

          at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7485]

          at mx.core::UIComponent/addChildAt()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7189]

          at spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.5.1\frameworks\projects\ spark\src\spark\components\Group.as:2037]

          at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1628]

          at spark.components::Group/setMXMLContent()[E:\dev\4.5.1\frameworks\projects\spark\src\spark \components\Group.as:633]

          at spark.components::Group/createChildren()[E:\dev\4.5.1\frameworks\projects\spark\src\spark \components\Group.as:855]

          at mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7624]

          at com.trinov.sage.app.home::HomeView/initialize()

          at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7485]

          at mx.core::UIComponent/addChildAt()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7189]

          at spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.5.1\frameworks\projects\ spark\src\spark\components\Group.as:2037]

          at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1628]

          at spark.components::Group/setMXMLContent()[E:\dev\4.5.1\frameworks\projects\spark\src\spark \components\Group.as:633]

          at spark.components::Group/set mxmlContent()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:573]

          at spark.components::SkinnableContainer/set mxmlContent()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\SkinnableContai ner.as:657]

          at spark.components::SkinnableContainer/createDeferredContent()[E:\dev\4.5.1\frameworks\proj ects\spark\src\spark\components\SkinnableContainer.as:1050]

          at spark.components::SkinnableContainer/createContentIfNeeded()[E:\dev\4.5.1\frameworks\proj ects\spark\src\spark\components\SkinnableContainer.as:1078]

          at spark.components::SkinnableContainer/createChildren()[E:\dev\4.5.1\frameworks\projects\sp ark\src\spark\components\SkinnableContainer.as:885]

          at mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7624]

          at com.trinov.sage.app::AppModule/initialize()

          at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7485]

          at mx.core::UIComponent/addChildAt()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7189]

          at spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.5.1\frameworks\projects\ spark\src\spark\components\Group.as:2037]

          at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1628]

          at spark.components::Group/addElementAt()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\c omponents\Group.as:1387]

          at spark.components::Group/addElement()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\com ponents\Group.as:1345]

          at spark.modules::ModuleLoader/moduleReadyHandler()[E:\dev\4.5.1\frameworks\projects\spark\s rc\spark\modules\ModuleLoader.as:690]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at ModuleInfoProxy/moduleEventHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\mo dules\ModuleManager.as:1149]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at ModuleInfo/readyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\modules\Modul eManager.as:793]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at mx.core::FlexModuleFactory/update()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\cor e\FlexModuleFactory.as:535]

          at mx.core::FlexModuleFactory/docFrameHandler()[E:\dev\4.5.1\frameworks\projects\framework\s rc\mx\core\FlexModuleFactory.as:681]

          at mx.core::FlexModuleFactory/docFrameListener()[E:\dev\4.5.1\frameworks\projects\framework\ src\mx\core\FlexModuleFactory.as:131]

       

      If I wrote <s:RadioButton id="adminRadio" label="Administrateur" value="ROLE_ADMIN" groupName="roleGroup" skinClass="spark.skins.spark.RadioButtonSkin" /> it's ok.

       

      If I put the skinClass element in a stylesheet like this :

      s|RadioButton {

          skinClass: "spark.skins.spark.RadioButtonSkin"

      }

      that does not work.

       

      Maybe somebody knows where is my problem ?

       

      --

      Marie