*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 didn't realize that the component hadn't been added to the displayList. Serves me right for not fully reading the question and firing off a half-baked suggestion. Let me try again.... To the OP: if you don't want to extend the component, you should be able to get commitProperties() to fire on a component that has not been added to the displayList by first calling invalidateProperties() and then call validateProperties(). *E.G.* var cmp:UIComponent = new UIComponent(); cmp.invalidateProperties(); cmp.validateProperties(); For the above example, cmp's commitProperties() method will fire even though the component isn't on the displayList. Both invalidateProperties() and validateProperties() are required. On Wed, Mar 11, 2015 at 4:32 PM, Jeffry Houser <jef...@dot-com-it.com> wrote: > 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 > > -- Jake Knerr - Flex Developer Ardisia Labs www.ardisialabs.com