0 Replies Latest reply on Dec 30, 2013 7:57 AM by mark21549

    Protected class variables not visible in component (Bug)

    mark21549

      Using Windows Flash Builder 4.7:

       

      I create an Actionscript base class for a component extending BorderContainer and add _test protected variable to the class, then create an MXML component based on this class. this._test doesn't appear in the autocomplete drop down.

       

      Why are protected variables not autocompleting, and doesn't cause an error if you type it in? Is this a bug in Flash Builder 4.7?

       

      CODE:

       

      package testcomponents

      {

          import spark.components.BorderContainer;

         

          public class BaseTest extends BorderContainer

          {

             

              protected var _test:String = '';

             

              public function BaseTest()

              {

                  super();

              }

          }

      }

       

      <?xml version="1.0" encoding="utf-8"?>

      <testcomponents:BaseTest xmlns:fx="http://ns.adobe.com/mxml/2009"

                               xmlns:s="library://ns.adobe.com/flex/spark"

                               xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:testcomponents="testcomponents.*">

          <fx:Declarations>

              <!-- Place non-visual elements (e.g., services, value objects) here -->

          </fx:Declarations>

          <fx:Script>

              <![CDATA[

                 

                  private function init():void

                  {

                      this._test = 'Not in autocomplete';

                  }

                 

                 

              ]]>

          </fx:Script>

      </testcomponents:BaseTest>