On 3/11/2015 1:01 PM, Jake Knerr wrote:
Try calling invalidateProperties() before calling validateNow() to get
commitProperties() to fire.
If it isn't on the stage; then invalidateProperties will have no affect; because the SystemManager (is that the right class?) is not aware of it; and will push the component through its validation process. I pulled up the old code. This was my render method for both MX and Spark components.


        public function render(argInheritingStyles : Object):void{
            this.createChildren();
            this.childrenCreated();
            this.initializationComplete();
            this.inheritingStyles = argInheritingStyles;
            this.commitProperties();
            this.setStyle('paddingLeft',0);
            this.setStyle('paddingRight',0);
            this.setStyle('paddingTop',0);
            this.setStyle('paddingBottom',0);
            this.measure();
            this.height = this.measuredHeight;
            this.width = this.measuredWidth;
this.updateDisplayList(this.unscaledWidth,this.unscaledHeight);
        }


Since it sounds like you want to 'use' and interact with the component; you'll probably also need a method that does update cycles.

--
Jeffry Houser
Technical Entrepreneur
http://www.jeffryhouser.com
203-379-0773

Reply via email to