Hi,

You could do this;

try {
  children = obj.getChildren();
}
catch (e:Error)
{
  trace(e, "obj did not have getChildren()");
}


Peace, Mike


On 03 Apr 2007 11:41:25 -0700, blc187 <[EMAIL PROTECTED]> wrote:

  is there a way to tell if an object has a getChildren method before
calling it?

I'm calling something that takes any type as the first argument
public function myFunc(obj:*):void

I need to tell if obj has a getChildren() method before I call it and
get an error saying Error #1006: getChildren is not a function.




--
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