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

Home » Public Forums » archive » Re: IDL Application Development
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: IDL Application Development [message #46650] Thu, 08 December 2005 10:45 Go to next message
David Fanning is currently offline  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 Go to previous messageGo to next message
Rick Towler is currently offline  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 Go to previous messageGo to next message
David Fanning is currently offline  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 #46659 is a reply to message #46657] Thu, 08 December 2005 02:18 Go to previous messageGo to next message
peter.albert@gmx.de is currently offline  peter.albert@gmx.de
Messages: 108
Registered: July 2005
Senior Member
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. As for the VM, simply call

idl -vm="myfile.sav"

from the command line.

Cheers,

Peter
Re: IDL Application Development [message #46660 is a reply to message #46659] Thu, 08 December 2005 00:44 Go to previous messageGo to next message
Peter Clinch is currently offline  Peter Clinch
Messages: 98
Registered: April 1996
Member
Alunduil wrote:

> I have written an IDL application that spans approximately 10
> interconnected programs/functions, and I want to compile a .sav file. I
> developed these files in good old Kate, and the IDL command prompt. The
> heart of my question is how do I create a .sav from the command line?
> How do I use the full IDL version to run the virtual machine (can I)?
> Any other suggestions would be appreciated. Thanks in advance.

I think the following should do it...

do a FULL_RESET_SESSION
.COMPILE your file(s)
RESOLVE_ALL
SAVE, /ROUTINES, 'myfile.sav'

No need to run the VM from the full session, just start it up alongside
(it's a separate application).

This is in the 6.2 help under "Creating Apllication SAVE Files.

hth, Pete.
--
Peter Clinch Medical Physics IT Officer
Tel 44 1382 660111 ext. 33637 Univ. of Dundee, Ninewells Hospital
Fax 44 1382 640177 Dundee DD1 9SY Scotland UK
net p.j.clinch@dundee.ac.uk http://www.dundee.ac.uk/~pjclinch/
Re: IDL Application Development [message #46747 is a reply to message #46657] Thu, 08 December 2005 11:03 Go to previous message
David Fanning is currently offline  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/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Debug
Next Topic: debug IDL DLM in Visual C++

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

Current Time: Wed Oct 08 17:06:17 PDT 2025

Total time taken to generate the page: 0.00615 seconds