How to create a sav file for a system based on catalyst [message #87884] |
Mon, 03 March 2014 01:46  |
Jie Zhou
Messages: 27 Registered: February 2014
|
Junior Member |
|
|
I coded a system based on catalyst. And many class given in catalyst lib has been used. Now I try to create a sav file for my system. It seems that I should resolve all class defined in the catalyst and used in my system. Is there some other simple method to finish work?
Cheers,
Jie
|
|
|
|
Re: How to create a sav file for a system based on catalyst [message #87891 is a reply to message #87886] |
Mon, 03 March 2014 08:21   |
Phillip Bitzer
Messages: 223 Registered: June 2006
|
Senior Member |
|
|
On Monday, March 3, 2014 7:14:28 AM UTC-6, David Fanning wrote:
>
> Yes, objects are always a problem. I always say that Resolve_All
>
> resolves "almost all" routines, but it ignores objects. (I know about
>
> the CLASS keyword, but in practice that seldom helps me.)
>
Hmm. I find quite the opposite - class _does_ help me - although I'm not maintaing projects quite as extensive as yours.
To build my applications, I have a "make" file that I run (as a script) in a fresh session of IDL.
All (actually, most) of the routines are in one folder, so the make file starts with this:
files = FILE_SEARCH('path_to_dir/*.pro')
FOR i=0, N_ELEMENTS(files)-1 DO RESOLVE_ROUTINE, FILE_BASENAME(files[i], '.pro'), /EITHER
There are some routines not picked up by this, including my generic object handlers (s/o to Mike Galloy), so I also have things like:
RESOLVE_ROUTINE, 'pmb_object_event_handler'
RESOLVE_ROUTINE, 'pmb_object_cleanup'
Finally, like David said, objects (and structure definitions) are not picked up by RESOLVE_ROUTINE, so I have to include things like this too:
RESOLVE_ALL, CLASS='cgCmdWindow', /CONTINUE
Finally, I have the line:
SAVE, /ROUTINES, filename=save_filename
It's not quite as easy as the "Build Project," and it takes a little hand holding (when I add a new object, I have to remember to put it in the make file), but I find it gives me more flexibility and, more importantly, it works.
|
|
|
Re: How to create a sav file for a system based on catalyst [message #87971 is a reply to message #87891] |
Fri, 07 March 2014 00:46  |
Jie Zhou
Messages: 27 Registered: February 2014
|
Junior Member |
|
|
On Monday, March 3, 2014 5:21:17 PM UTC+1, Phillip Bitzer wrote:
> On Monday, March 3, 2014 7:14:28 AM UTC-6, David Fanning wrote:
>
>
>
>>
>
>> Yes, objects are always a problem. I always say that Resolve_All
>
>>
>
>> resolves "almost all" routines, but it ignores objects. (I know about
>
>>
>
>> the CLASS keyword, but in practice that seldom helps me.)
>
>>
>
>
>
> Hmm. I find quite the opposite - class _does_ help me - although I'm not maintaing projects quite as extensive as yours.
>
>
>
> To build my applications, I have a "make" file that I run (as a script) in a fresh session of IDL.
>
>
>
> All (actually, most) of the routines are in one folder, so the make file starts with this:
>
>
>
> files = FILE_SEARCH('path_to_dir/*.pro')
>
> FOR i=0, N_ELEMENTS(files)-1 DO RESOLVE_ROUTINE, FILE_BASENAME(files[i], '.pro'), /EITHER
>
>
>
> There are some routines not picked up by this, including my generic object handlers (s/o to Mike Galloy), so I also have things like:
>
> RESOLVE_ROUTINE, 'pmb_object_event_handler'
>
> RESOLVE_ROUTINE, 'pmb_object_cleanup'
>
>
>
> Finally, like David said, objects (and structure definitions) are not picked up by RESOLVE_ROUTINE, so I have to include things like this too:
>
> RESOLVE_ALL, CLASS='cgCmdWindow', /CONTINUE
>
>
>
> Finally, I have the line:
>
> SAVE, /ROUTINES, filename=save_filename
>
>
>
> It's not quite as easy as the "Build Project," and it takes a little hand holding (when I add a new object, I have to remember to put it in the make file), but I find it gives me more flexibility and, more importantly, it works.
That's similar as my solution!
thanks.
|
|
|