Save a linkedlist? [message #68602] |
Fri, 13 November 2009 11:54 |
Brian Larsen
Messages: 270 Registered: June 2006
|
Senior Member |
|
|
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'.
Cheers,
Brian
------------------------------------------------------------ --------------
Brian Larsen
Boston University
Center for Space Physics
|
|
|