Brad, creationComplete is an event, and not a method or property. In MXML, these look very similar, but in ActionScript, you need to explicitly add an event listener to handle the event. E.g.,
comboBox.addEventListener(FlexEvent.CREATION_COMPLETE, handleCreationComplete) and then elsewhere in the file, define the handler, as you would in MXML: private function handleCreationComplete(e:FlexEvent):void { ... } -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -----Original Message----- From: brad.bueche <b...@bueche.com> Reply-to: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Dynamic creation of ComboBox in ActionScript Date: Thu, 02 Apr 2009 13:24:31 -0000 Big Picture: I'm trying to recreate the dynamic search interface in search coders app. I think it will be a great base for an sql front end. I can create combo-box's dynamically via the button. However, I want as much configuration as possible to come from a database (so I can change my app without going through all the red-tape of change control). Sooo... I need to create the ComboBox when the the button is pressed but THEN (here is the question): I need it to execute a function, conn.getData(), in order to have the ComboBox populated. In mxml, I would use creationComplete. However, actionscript does not seem to have this method for ComboBox. What do I use? I've searched the methods for ComboBox but nothing is jumping out at me....except maybe initialized. Are the 3 phases of layout done before the call to a dataprovider (if I want the data at creationcomplete)? (Yes, I'm working through my flex authority issues too). And, while I'm at it, what would be the best method -- via actionscript-- for completely removing the ComboBox (and putting it out for garbage collection) if the minus button is pressed?