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

Home » Public Forums » archive » Re: Saving / Restoring Objects
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: Saving / Restoring Objects [message #35040 is a reply to message #35031] Fri, 09 May 2003 06:33 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
mfeldt (mfeldt@mpia.de) writes:

> trying myself and surfing the web I find a lot of remarks how useful
> it is to save and restore idl objects. However, for me it doesn't
> seem to work - am I doing something wrong here? Basically what I do is
> this:
>
> IDL> a=obj_new('fancy_object')
> % Compiled module: FANCY_OBJECT__DEFINE.
> ;;
> ;; this compiled my object with lots of functions etc..
> ;;
> IDL> a-> set,'Debug',1 ; internal variable access...
> ;;
> ;; many more of those may go here
> ;;
> ;; then:
> IDL> save,a,file='test.sav'
>
> IDL> exit
>
> ;; now a new session
>
> IDL> restore, file='test.sav'
> IDL> help,a,/obj
> ** Object class FANCY_OBJECT, 0 direct superclasses, 0 known methods
>
> ;; i.e. the object seems to be there, but all information on it and
> all methods are lost... I also tried compiling the related code first,
> but no use...
>
> Is there any way to make this work??

I don't think the methods are "lost", they just haven't
yet made themselves known to IDL. (Although I would have
thought compiling the routines should have worked and would
be essential--you use Resolve_Routine, right?--to restore
the object properly) In any case, I would feel free to use
your restored object as normal and see what happens.

I guess whether the methods can be "found" will depend to
some extent on how you are naming the methods and the files
that contain them. But this SAVE/RESTORE method certainly
works for objects.

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
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: test
Next Topic: FINDFILE - how many files can it find?

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

Current Time: Sat Oct 11 07:55:22 PDT 2025

Total time taken to generate the page: 0.71998 seconds