Hi,

Put your calling code in a try{} catch{} block, then you will not get the
RTE.

try {
   someObject.validate();
}
catche (e:Error)
{
   trace(someObject.className, "Has no validate() method");
}

There are a couple other ways but, this is pretty clean and gets the job
done.

Peace, Mike


On 9/18/07, j_lentzz <[EMAIL PROTECTED]> wrote:
>
>   Hi,
>
> I've got a problem I'm trying to resolve concerning validating a page
> before submitting it to the server. I have a way to recursively get
> each child on the page. However, I can't figure out a way to see if
> the child has the validate() method implemented. Most of the
> components are extended from TextInputs, ComboBox, etc, where I've
> integrated a validator into each one that is custom for that type. So
> my custom components will have a validate method, however, other
> components - like Images, Buttons, etc - on the page don't have a
> validate method. Is there a way to test that a method exists, before
> trying to call it and causing an exception?
>
> Thanks,
>
> John
>
>  
>



-- 
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.

Reply via email to