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

Home » Public Forums » archive » Re: Save a linkedlist?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Save a linkedlist? [message #68596] Fri, 13 November 2009 12:51
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Brian Larsen writes:

> Perfect, thanks much works like a charm. (except Coyote doesn't have
> resolve_obj.pro in his library you have to get it manually from his
> site)

Well, that's weird. Fixed now. Named Resolve_Object. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Save a linkedlist? [message #68598 is a reply to message #68596] Fri, 13 November 2009 12:40 Go to previous message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
Perfect, thanks much works like a charm. (except Coyote doesn't have
resolve_obj.pro in his library you have to get it manually from his
site)

Brian

------------------------------------------------------------ --------------
Brian Larsen
Boston University
Center for Space Physics
Re: Save a linkedlist? [message #68601 is a reply to message #68598] Fri, 13 November 2009 12:07 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Nov 13, 5:54 pm, Brian Larsen <balar...@gmail.com> wrote:
> Hey all,
> I have some satellite data that I am mining and a linkedlist seems to
> be a great way to store this.  I would like to store this data to a
> file, it seems like the easiest way is to just use save, listname.
> The problem is that restore then doesn't seem to work.  Is this an
> issue where pointer objects can't be saved and restored or am I doing
> something wrong (or both)?
>
> IDL>  mylist = Obj_New("LINKEDLIST", 5)
> IDL>  mylist->Add, 10
> IDL>  mylist->Add, findgen(10)
> IDL> save, 'test.idl', mylist
>
> quit and restart idl
>
> IDL> restore, 'test.idl'
> IDL> help
> % At $MAIN$
> MYLIST          OBJREF    = <ObjHeapVar1(LINKEDLIST)>
> IDL> print, mylist->get_item(/all, /deref)
> % Attempt to call undefined method: 'LINKEDLIST::GET_ITEM'.
> % Execution halted at: $MAIN$
> IDL> print, mylist->get_item(1, /deref)
> % Attempt to call undefined method: 'LINKEDLIST::GET_ITEM'.

They are saved and can be restored. The problem is that just restoring
an object does not recompile its methods. See

http://www.dfanning.com/tips/saved_objects.html

http://groups.google.com/group/comp.lang.idl-pvwave/browse_t hread/thread/a6e6ff9aaed479cb
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Save a linkedlist?
Next Topic: Re: Randomu() behavior - BAD!

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

Current Time: Wed Oct 08 11:33:46 PDT 2025

Total time taken to generate the page: 0.00567 seconds