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

Bindable Metadata does not work in SubClass

Agile BoardAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Apache Flex 4.8 (parity release)
    • None
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            hkiku hiroyuki kikuchi

            Dates

              Created:
              Updated:

              Slack

                Issue deployment