Thanks Gordon, Is there a way to turn a TextInput into a TextInputSpecial at runtime? Or a way to say all <mx:TextInput ..> tags use instances of TextInputSpecial instead?
Initially I wanted to have some variables available in a change handler so I could pull it out by event.target.myExtraStuff, but I ended up dynamically creating the event.CHANGE functions to include the data I need. I'm still curious if it is possible to dynamically re-type something at runtime. The only way I could see it working if the new type is an extened class of the orginal. I imagine you can't do this... Thanks again, Adam --- In [email protected], "Gordon Smith" <[EMAIL PROTECTED]> wrote: > > The Flex component classes like TextInput aren't dynamic, so you can't > add any properties to them that aren't declared at compile time. > > However, if you create a dynamic subclass > > public dynamic class TextInputSpecial extends TextInput > { > ... > } > > you should be able to add anything you want at runtime: > > > myTextInputSpecial.foo = "bar"; > > Alternately, you can make a non-dynamic subclass which has an Object var > to which you can add things dynamically, because the Object class is > dynamic: > > public class TextInputSpecial extends TextInput > { > var extraStuff:Object = {}; > ... > } > > myTextInputSpecial.extraStuff.foo = "bar: > > - Gordon > -- 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/

