Quantcast
Channel: Adobe Community : Discussion List - Using Flash Builder
Viewing all articles
Browse latest Browse all 1802

Protected class variables not visible in component (Bug)

$
0
0

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>


Viewing all articles
Browse latest Browse all 1802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>