Re: IDL Application Development [message #46650] |
Thu, 08 December 2005 10:45  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Rick Towler writes:
> The CLASS keyword... They sneak things in when you're not looking.
> Will that pick up functions and procedures called within class methods?
I guess so. I've never had any trouble with it. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: IDL Application Development [message #46652 is a reply to message #46650] |
Thu, 08 December 2005 10:20   |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
David Fanning wrote:
> Peter Albert writes:
>
>
>> Just a remark, if your routines call objects, make sure to compile the
>> object routines beforehand, as as far as I know they are not resolved
>> by resolve_all.
>
>
> IF your object methods are all in the same file, and
> IF you have named your file correctly, and IF you
> put the routines in the proper order in the file
> (and who wouldn't, what with all the harping I do about it?),
> THEN you can use the CLASS keyword to RESOLVE_ALL
> to list your object classes and they will be
> resolved along with everything else.
The CLASS keyword... They sneak things in when you're not looking.
Will that pick up functions and procedures called within class methods?
FWIW, here is an example of a "makfile" that I use to build .sav files
that I wrote before 6.0 (when the CLASS keyword was introduced). It
works for me, if maybe a little wordy compared to one using the CLASS
keyword.
-Rick
; make_net3d.pro
; "makefile" for net3d.sav
; compile main program and resolve standard dependencies
resolve_routine, 'net3d', /compile_full_file
resolve_all
; objects and procedures called from within objects
; must be explicitly compiled
resolve_routine, 'cv_coord', /compile_full_file, /is_function
resolve_routine, 'reverse', /compile_full_file, /is_function
resolve_routine, 'linkedlist__define', /compile_full_file
resolve_routine, 'RHTgrAABB__define', /compile_full_file
resolve_routine, 'RHTgrQuaternion__define', /compile_full_file
resolve_routine, 'RHTgrGrid__define', /compile_full_file
resolve_routine, 'RHTgrCamera__define', /compile_full_file
resolve_routine, 'RHTgrDXFModel__define', /compile_full_file
; save the run-time "executable"
save, /routines, /compress, filename='net3d.sav'
end
|
|
|
Re: IDL Application Development [message #46657 is a reply to message #46652] |
Thu, 08 December 2005 05:29   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Peter Albert writes:
> Just a remark, if your routines call objects, make sure to compile the
> object routines beforehand, as as far as I know they are not resolved
> by resolve_all.
IF your object methods are all in the same file, and
IF you have named your file correctly, and IF you
put the routines in the proper order in the file
(and who wouldn't, what with all the harping I do about it?),
THEN you can use the CLASS keyword to RESOLVE_ALL
to list your object classes and they will be
resolved along with everything else.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
|
|
Re: IDL Application Development [message #46747 is a reply to message #46657] |
Thu, 08 December 2005 11:03  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
I wrote earlier:
> IF your object methods are all in the same file...
> THEN you can use the CLASS keyword to RESOLVE_ALL
> to list your object classes and they will be
> resolved along with everything else.
I'm told now, by someone who should know, that the methods
don't all have to be in the same file. Each method can
be in its own file, if it is named appropriately, etc.
The important thing is that the class name be present
(as it would have to be if you named the thing correctly):
myclass__define.pro
myclass__init.pro
myclass__magic.pro
RESOLVE_ALL, ... , CLASS='myclass'
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|