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

Home » Public Forums » archive » How to find if an object contains another
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
How to find if an object contains another [message #22146] Thu, 19 October 2000 00:00 Go to previous message
Dave Greenwood is currently offline  Dave Greenwood
Messages: 33
Registered: October 2000
Member
How do I determine if an object "contains" another one?

For example, I can create a model object and add a surface object or
a plot object. Given that model object, how would I find out whether
or not a surface object has been added?

The best I've come up with is something like:

xx = model->get(/all,isa='idlgrsurface')
s = size(xx)
if s[1] eq 11 then $
print,'Has one or more surface' $
else $
print,'Has no surfaces'

Surely there's a simpler way?

A related question is: how do I test if an object pointer (returned by
the GetByName method, for example) is null?

Thanks,
Dave
--------------
Dave Greenwood Email: Greenwoodde@ORNL.GOV
Oak Ridge National Lab %STD-W-DISCLAIMER, I only speak for myself
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Newbie question (w/colorful points)...
Next Topic: making an object from class structure?

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

Current Time: Fri Oct 10 05:04:32 PDT 2025

Total time taken to generate the page: 0.79569 seconds