new object from a save/restore doesn't execute init function [message #35181] |
Fri, 16 May 2003 11:30 |
paul wisehart
Messages: 28 Registered: December 2002
|
Junior Member |
|
|
Hi,
I am trying to put my object code into an IDL save file
so that its easier for me to share/maintain code.
This is my situation:
I have a class.
The init method of the class prints some output.
(just to verify that the init function is being executed.)
I have "saved" all of the routines of my class/object:
IDL> save , /routines, 'my_class::init', 'my_class::pro_1', ... etc.
This is my problem:
I "restore" the above save file.
I instantiate a "my_class" object.
IDL> o = obj_new('my_class')
I don't get the output from the init method !?
How come my object is not executing the init function?
I can:
IDL> o->pro_1 ;this works
Also:
If I instantiate the object *without* restoring the save file
IDL outputs the text from the init method.
(This obviously only works if the code files are named correctly,
and in my path.)
Can someone see the error in may ways?
thanks,
--
paul \ /
wisehart >/
<//////$>
|\|\|\
|
|
|