You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "DarkStone (JIRA)" <ji...@apache.org> on 2014/12/19 09:16:13 UTC

[jira] [Updated] (FLEX-34689) How to correctly set the default skinClass for custom SkinnableComponent?

     [ https://issues.apache.org/jira/browse/FLEX-34689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

DarkStone updated FLEX-34689:
-----------------------------
    Summary: How to correctly set the default skinClass for custom SkinnableComponent?  (was: How to correctly set default skinClass for custom SkinnableComponent?)

> How to correctly set the default skinClass for custom SkinnableComponent?
> -------------------------------------------------------------------------
>
>                 Key: FLEX-34689
>                 URL: https://issues.apache.org/jira/browse/FLEX-34689
>             Project: Apache Flex
>          Issue Type: Question
>          Components: Spark: SkinnableComponent
>    Affects Versions: Apache Flex 4.13.0
>            Reporter: DarkStone
>            Assignee: DarkStone
>            Priority: Minor
>              Labels: easyfix, easytest
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> This issue has been resolved, here is the right way to set default skinClass for the custom SkinnableComponent, which is to use the Type Selector:
> package test
> {
> 	import flash.utils.getQualifiedClassName;
> 	
> 	import mx.styles.CSSStyleDeclaration;
> 	
> 	import spark.components.supportClasses.SkinnableComponent;
> 	
> 	public class TestComponent extends SkinnableComponent
> 	{
> 		public function TestComponent()
> 		{
> 			super();
> 			var css:CSSStyleDeclaration = new CSSStyleDeclaration();
> 			css.setStyle("skinClass", skin.DefaultTestComponentSkin);
> 			styleManager.setStyleDeclaration(getQualifiedClassName(this).replace(/::/g, "."), css, true);
> 		}
> 	}
> }
> DarkStone
> 2014-12-19



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)