For anyone interested:

I figured something out and remember reading something about this, 
although I can't find a link at the moment.

The getter is setting the property. The setter is ignored, and in fact 
there doesn't need to be a setter, and the private property is set.

Example: (the same as my previous code except with the set function 
commented out)

class MyClass
{
        private var _scrollTargets:Array = new Array();

        function MyClass()
        {
                init();
        }

        public function init():Void
        {
                trace('init: '+_scrollTargets);
        }

        [Inspectable(type="Array",defaultValue="_level0")]
        /*
        public function set scrollTargets(t:Array)
        {
                trace('set: '+t);
        }
        */
        public function get scrollTargets():Array
        {
                trace('get: '+_scrollTargets);

                return _scrollTargets;
        }
}

This traces:
get:
init: _level5

Mystery solved. Dumb, but at least it can be explained.


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to