Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TextField polymorphism?

Status
Not open for further replies.

theotrain

Programmer
Mar 5, 2003
150
0
0
MX
ive created an object that extends TextField, let's say "MyTextField". i just want it to be a TextField with a few extra functions.

i have a flash component that takes a TextField instance name as a parameter. my goal is to dynamically create a MyTextField and have the component use that, but it seems to choke, presumably because it sees its not a TextField. it seems the program doesnt really "know" that MyTextField has all the properties of a TextField and should be able to stand in for one.

simply casting it to a TextField doesnt seem to work either, unsurprisingly. so whats the best way to go here?

im just looking for the simplest way that i can use MyTextfield in code that calls for a TextField. im sorta familiar with oop basics... but not much real experience.

thanks>>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top