Доступ к настраиваемому свойству hostComponent при создании скина - Flex 4.5, SDK 4.5

Используя SDK 4.1, я смог получить доступ к настраиваемым свойствам компонента настраиваемой кнопки из настраиваемой оболочки. Для проекта, над которым я сейчас работаю, требуется SDK 4.5, и я не могу получить доступ к свойствам. Вот пример:

Пользовательский компонент кнопки

<?xml version="1.0" encoding="utf-8"?>
<s:ButtonBase xmlns:fx="http://ns.adobe.com/mxml/2009" 
          xmlns:s="library://ns.adobe.com/flex/spark" 
          xmlns:mx="library://ns.adobe.com/flex/mx"
          skinClass="components.skins.ButtonIcon_Skin"
          >
    <fx:Declarations>
        <fx:String id="iconCustom" />
    </fx:Declarations>
</s:ButtonBase>

Пользовательский скин кнопки

<?xml version="1.0" encoding="utf-8"?>
<s:SparkButtonSkin xmlns:fx="http://ns.adobe.com/mxml/2009" 
             xmlns:s="library://ns.adobe.com/flex/spark" 
             xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
             minWidth="21" minHeight="21" 
             alpha.disabled="0.5">
    <fx:Metadata>[HostComponent("components.ButtonIcon")]</fx:Metadata>

...

    <s:Label id="test" {hostComponent.iconCustom}" 
             horizontalCenter="0" bottom="10" />

</s:SparkButtonSkin>

Подсказка кода показывает hostComponent.iconCustom , но затем выдает ошибку:

Access of possibly undefined property iconCustom through a reference with static type spark.components.supportClasses:ButtonBase. ButtonIcon_Skin.mxml
5
задан Trist 7 June 2011 в 16:10
поделиться