Re: determing object type at runtime in IDL [message #36849] |
Fri, 31 October 2003 08:17 |
reger
Messages: 2 Registered: October 2003
|
Junior Member |
|
|
JD Smith <jdsmith@as.arizona.edu> wrote in message news:<pan.2003.10.30.00.42.47.764280.5089@as.arizona.edu>...
> On Wed, 29 Oct 2003 16:15:08 -0700, David Fanning wrote:
>
>> Rob Eger writes:
>>
>>> Is there a way to determine the type of object something is at runtime?
>>> For example, if an object x is an IDLgrView or IDLgrModel object.
>>> SIZE doesn't help as far as I can tell because it will only tell you
>>> it's an OBJREF.
>>
>> Try this:
>>
>> IDL> Print, Obj_Class(object)
>
> Or, more often what you want:
>
> IDL> print,obj_isa(object,'IDLgrModel')
>
> which searches up the inheritence tree too.
>
> JD
Thanks for the pointers. I think that'll give me what I'm looking for.
Rob.
|
|
|
Re: determing object type at runtime in IDL [message #36861 is a reply to message #36849] |
Wed, 29 October 2003 16:42  |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Wed, 29 Oct 2003 16:15:08 -0700, David Fanning wrote:
> Rob Eger writes:
>
>> Is there a way to determine the type of object something is at runtime?
>> For example, if an object x is an IDLgrView or IDLgrModel object.
>> SIZE doesn't help as far as I can tell because it will only tell you
>> it's an OBJREF.
>
> Try this:
>
> IDL> Print, Obj_Class(object)
Or, more often what you want:
IDL> print,obj_isa(object,'IDLgrModel')
which searches up the inheritence tree too.
JD
|
|
|
Re: determing object type at runtime in IDL [message #36863 is a reply to message #36861] |
Wed, 29 October 2003 15:15  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Rob Eger writes:
> Is there a way to determine the type of object something is at
> runtime? For example, if an object x is an IDLgrView or IDLgrModel
> object. SIZE doesn't help as far as I can tell because it will only
> tell you it's an OBJREF.
Try this:
IDL> Print, Obj_Class(object)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|