Instead of using createTab(classRef, instanceName, label, icon) use createChildWithStyles(classRef, instanceName, initObj)
ie: customCreateTab(classRef:Function, instanceName:String, label:String, icon:String, customParam:String):Void { var initObj = new Object(); if(label != undefined) { initObj.label = label; } if(icon != undefined) { initObj.icon = icon; } if(customParm != undefined) { initObj.customParam = customParam; } yourPathToTabNavigator.createChildWithStyles(classRef, instanceName, initObj); } I recommend you keep this in a method wrapper to safe guard yourself down the track in the event createChildWithStyles() is deleted from Flex 2.0, 3.0, 4.0 etc.. as your now off the reservation so to speak. On 7/22/05, Cliff Meyers <[EMAIL PROTECTED]> wrote: > I have a class that dynamically adds several components to a > TabNavigator via AS. I need to pass some data into these components. > If they were static (ie, created with MXML) I'd just add an attribute > and so some databinding. How can I accomplish the same thing with AS? > There doesn't seem to be a way to assign an ID to a component when > creating it so I'm not sure what the best way to access the component > is using AS. Thanks a lot! > > > -Cliff > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com > Yahoo! Groups Links > > > > > > > -- Regards, Scott Barnes http://www.mossyblog.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/