This content has been marked as final. Show 6 replies
Alert.show("Error in: " + Name.text , "Error");
"manofspirit" <email@example.com> wrote in message
> Hello All
> this code show me the source property of the emailValidator which is
> along with the whole path like vbox4.Name
> i just want to show the info about the text control. But HOW?
look at the split() function.
lol. i can also do that ;)
actually ill have 3-4 form fields and ill get the validation from them into an array, and then ill show the msg frm its respected field. I learnt this thing from a book.
okey, Ill use it and will let you know the outcome
Thanks you All :)
So, everything in AS has an 'instance name' which in mxml is set by the id. Even if you don't provide an id it is set by the compiler - when debugging you will see numbers when you don't set an id.
AS3 gives you the opportunity to retrieve that instance name with the property .name and you can also set the instance name in AS with .name
I use substr instead of split. This function works fine for me as all the form items are in the same area, so i have a calculated starting index!
Thanks a lot for the Idea