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

Home » Public Forums » archive » Re: Saved Object Question
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: Saved Object Question [message #67624 is a reply to message #67623] Thu, 20 August 2009 13:52 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
pp writes:

> Maybe I misunderstood the problem, but it seems to me that the names
> of the built-in classes should always be returned by a call to help.
> So instead of searching for __DEFINE in the output of routine_info(),
> Resolve_Obj could instead build a list of class names from the output
> of help:
>
> help,/objects,/full,output=3Dhobjs
> ;pick only the output lines with class names:
> hobjs=3Dhobjs[where(strpos(hobjs,'** Object class') ne -1,nclasses)]
> classes=3Dstrarr(nclasses) ;array for the known class names
> ;extract the class name from the rest of the help information:
> for i=3D0,nclasses-1 do classes[i]=3D(strsplit(hobjs[i],' ,',/extract))[3]
>
> Which when I run in a clean session in IDL 7.1 gives me 63 class
> names.

Parse the HELP command!? Uugghh.

I don't know. I decided to solve it with a silent
error handler and a GOTO statement. Probably a
double uugghh. :-(

Anyway, it works for my purposes at the moment.

I have slightly re-written JD's routine, and added
my own poor judgement, to some new code you can find
here:

http://www.dfanning.com/programs/resolve_object.pro

Cheers,

David

--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: is-it possible to extract multiple profiles on multiple images from shape files
Next Topic: Yet another build script

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

Current Time: Sat Oct 11 02:14:14 PDT 2025

Total time taken to generate the page: 0.36063 seconds