Saved Object Question [message #67644] |
Wed, 19 August 2009 16:00  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Folks (and especially JD),
JD wrote a nifty little routine that can be called
when saved objects are restored. You can read about
it on the bottom of this page:
http://www.dfanning.com/tips/saved_objects.html
The idea is that the object's code, and that of its
superclasses, will be compiled just before (or just
after, in some cases) the object is restored, thereby
guaranteeing that the object's methods will be available
to it.
I had reason to use this little routine this afternoon,
and ran into a complication. When one of the object's
superclasses is a built-in IDL routine (in this case
IDL_Container), the routine fails, complaining--rightly--
that it can't find the undefined procedure/function named
idl_container__define.
The line it is complaining on is, of course, the CALL_PROCEDURE
line.
My head is already half-way into tennis mode for a match
tonight, so I thought I would ask if anyone had an idea
for how to stop this routine from crashing when it reached
a system routine or 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: Saved Object Question [message #67764 is a reply to message #67644] |
Fri, 21 August 2009 07:35  |
Matt[2]
Messages: 69 Registered: March 2007
|
Member |
|
|
David Fanning <news@dfanning.com> writes:
> In the meantime, it works, appears
> reasonably fast, and is something ugly I can point
> to when my grandchildren (some day!) ask me if I
> ever wrote ugly IDL code. ;-)
Coyote Ugly Code (tm)
--
Matthew Savoie - Scientific Programmer
National Snow and Ice Data Center
(303) 735-0785 http://nsidc.org
|
|
|