comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to know if an object has a certain method ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to know if an object has a certain method ? [message #65452] Tue, 03 March 2009 11:58 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
llo wrote:
> I've an object AA and I want to know if this object has a method named
> METHOD_AA...
>
> I could do something like this:
> if obj_isa(AA,'object_1') then 'the object has the method' $
> else 'the object doesn't has the method'
>
> There is another way to do that ?
>
> Thanks

Try OBJ_HASMETHOD (introduced in IDL 6.4). If you don't have IDL 6.4, I
would suggest that the best way to determine if it has the method is to
call it (and CATCH the error if it doesn't).

Mike
--
www.michaelgalloy.com
Associate Research Scientist
Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: How to know if an object has a certain method ?
Next Topic: Problem with labeling contour lines in IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 09:32:44 PDT 2025

Total time taken to generate the page: 0.87565 seconds