hiroyuki kikuchi created FLEX-33429:
---------------------------------------

             Summary: Bindable Metadata does not work in SubClass
                 Key: FLEX-33429
                 URL: https://issues.apache.org/jira/browse/FLEX-33429
             Project: Apache Flex
          Issue Type: Bug
          Components: .Unspecified - Compiler
    Affects Versions: Apache Flex 4.8 (parity release)
         Environment: Affected OS(s): All OS Platforms
Language Found: Japanese
            Reporter: hiroyuki kikuchi


If Parent Class has defined a Bindable Metadata, it is not active in SubClass.
It was working in Flex3.

The following code demonstrates the problem. Bindable Metadata is not exist in 
the Sub classes.

Parent.as
----------------------------------------
public class Parent
{

    private var _value:String;

    [Bindable]
    public function get value():String
    {
        return _value;
    }

    public function set value(value:String):void
    {
        if (_value != value)
        {
            _value = value;
        }
    }

    public function Parent()
    {
        super();
    }
}
----------------------------------------


Sub.as
----------------------------------------
public class Sub extends Parent
{

    override public function get value():String
    {
        return super.value;
    }

    public function Sub()
    {
        super();
    }
}
----------------------------------------


Main.mxml
----------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               width="100%" height="100%">
    <fx:Script>
        <![CDATA[
            import flash.utils.describeType;

            import sample.Parent;
            import sample.Sub;

            private var parentClass:Parent = new Parent();

            [Bindable]
            private var subClass:Sub = new Sub();

        ]]>
    </fx:Script>

    <s:layout>
        <s:VerticalLayout />
    </s:layout>

    <s:HGroup width="100%" height="100%">
        <s:TextArea width="50%" height="100%" 
text="{describeType(parentClass).toString()}" />
        <s:TextArea width="50%" height="100%" 
text="{describeType(subClass).toString()}" />
    </s:HGroup>
</s:Application>
----------------------------------------

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to