Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-33429

Bindable Metadata does not work in SubClass

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Apache Flex 4.8 (parity release)
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Affected OS(s): All OS Platforms
      Language Found: Japanese

      Description

      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>
      ----------------------------------------

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hkiku hiroyuki kikuchi
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: