Re: Self-compiling procedures [message #58722] |
Mon, 18 February 2008 00:55  |
Maarten[1]
Messages: 176 Registered: November 2005
|
Senior Member |
|
|
On Feb 16, 11:50 pm, Michael Aye <kmichael....@googlemail.com> wrote:
> On Feb 16, 11:30 pm, Spon <christoph.b...@gmail.com> wrote:
>> On Feb 16, 10:18 pm, maye <kmichael....@googlemail.com> wrote:
>>> Thanks so much for your fast answers, and I'm very sorry, I was too
>>> imprecise with my question, silly me.
>>> I am actually looking for a way to group similar procedures into one
>>> file to reduce the amount of library files, it's just harder to
>>> maintain.
>>> Is there a way to keep things still self-compilable when I put several
>>> procedures into one file?
>> Short answer - no.
>> Here, have a read of this, particularly the second half:
>> http://www.dfanning.com/tips/namefiles.html
> And I got an idea: I could at least sort things by subfolders. As IDL
> parses recursively - as it was mentioned before - I can put related
> procedures together.
> Thanks for your hints.
If the functions are truly related, you may want to investigate the
use of object programming. The IDL manual on the subject is quite
horrible - it assumes you want to use their object graphics and write
user interfaces in IDL (yuck). But as far as grouping related
function, it is a powerful concept. Be prepared to dive into pointers
though.
Maarten
|
|
|
Re: Self-compiling procedures [message #58727 is a reply to message #58722] |
Sat, 16 February 2008 15:50   |
maye
Messages: 29 Registered: June 2006
|
Junior Member |
|
|
On Feb 16, 11:30 pm, Spon <christoph.b...@gmail.com> wrote:
> On Feb 16, 10:18 pm, maye <kmichael....@googlemail.com> wrote:
>
>
>
>> On Feb 16, 11:05 pm, Spon <christoph.b...@gmail.com> wrote:
>
>>> On Feb 16, 6:47 pm, maye <kmichael....@googlemail.com> wrote:
>
>>>> Hi!
>>>> In terms of self-compiling I'm a beginner, so please excuse my
>>>> ignorance if this is written somewhere in the manual, I couldn't find
>>>> it easily at least:
>>>> So far I put every procedure I consider to be useful enough for more
>>>> than one task in its extra file, so that if it's called, IDL compiles
>>>> it automatically, having the procedure and file name identical.
>>>> But after a while, the number of files I have keeps growing.
>>>> I wonder if there's another elegant way to keep things auto-compilable
>>>> without me having to compile some kind of library before I start
>>>> working on a task using my "library" of useful procedures.
>>>> Am I missing something simple?
>>>> Thanks for any hints and a nice weekend!
>>>> Best regards,
>>>> Michael
>
>>> You should add your library directory to your !PATH - File->Preferences->Path.
>
>>> Then you can call every procedure/function in the library without ever
>>> having to compile it first. In fact, any directory that has any .pro
>>> file in it is probably better off in !PATH. Top level directories,
>>> anyway - thankfully IDL searches recursively.
>
>>> Take care,
>>> Chris
>
>> Thanks so much for your fast answers, and I'm very sorry, I was too
>> imprecise with my question, silly me.
>> I am actually looking for a way to group similar procedures into one
>> file to reduce the amount of library files, it's just harder to
>> maintain.
>> Is there a way to keep things still self-compilable when I put several
>> procedures into one file?
>
>> Cheers,
>> Michael
>
> Short answer - no.
>
> Here, have a read of this, particularly the second half:
>
> http://www.dfanning.com/tips/namefiles.html
>
> Good luck,
> Chris
Thx will do.
And I got an idea: I could at least sort things by subfolders. As IDL
parses recursively - as it was mentioned before - I can put related
procedures together.
Thanks for your hints.
Cheers,
Michael
|
|
|
Re: Self-compiling procedures [message #58728 is a reply to message #58727] |
Sat, 16 February 2008 14:45   |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
On Feb 16, 4:18 pm, maye <kmichael....@googlemail.com> wrote:
> On Feb 16, 11:05 pm, Spon <christoph.b...@gmail.com> wrote:
>
>> On Feb 16, 6:47 pm, maye <kmichael....@googlemail.com> wrote:
>
>>> Hi!
>>> In terms of self-compiling I'm a beginner, so please excuse my
>>> ignorance if this is written somewhere in the manual, I couldn't find
>>> it easily at least:
>>> So far I put every procedure I consider to be useful enough for more
>>> than one task in its extra file, so that if it's called, IDL compiles
>>> it automatically, having the procedure and file name identical.
>>> But after a while, the number of files I have keeps growing.
>>> I wonder if there's another elegant way to keep things auto-compilable
>>> without me having to compile some kind of library before I start
>>> working on a task using my "library" of useful procedures.
>>> Am I missing something simple?
>>> Thanks for any hints and a nice weekend!
>>> Best regards,
>>> Michael
>
>> You should add your library directory to your !PATH - File->Preferences->Path.
>
>> Then you can call every procedure/function in the library without ever
>> having to compile it first. In fact, any directory that has any .pro
>> file in it is probably better off in !PATH. Top level directories,
>> anyway - thankfully IDL searches recursively.
>
>> Take care,
>> Chris
>
> Thanks so much for your fast answers, and I'm very sorry, I was too
> imprecise with my question, silly me.
> I am actually looking for a way to group similar procedures into one
> file to reduce the amount of library files, it's just harder to
> maintain.
> Is there a way to keep things still self-compilable when I put several
> procedures into one file?
>
> Cheers,
> Michael
I started out putting several procedures in on file and found it
harder to maintain that way. With each file a separate procedure I
know exactly where to look. That said, of course it makes sense to
group procedures and functions in one file, if they are only used by
the "main" function (the one with the same name as the file). If they
are going to be used by themselves, then I break them out as separate
files.
|
|
|
Re: Self-compiling procedures [message #58729 is a reply to message #58728] |
Sat, 16 February 2008 14:30   |
Spon
Messages: 178 Registered: September 2007
|
Senior Member |
|
|
On Feb 16, 10:18 pm, maye <kmichael....@googlemail.com> wrote:
> On Feb 16, 11:05 pm, Spon <christoph.b...@gmail.com> wrote:
>
>
>
>> On Feb 16, 6:47 pm, maye <kmichael....@googlemail.com> wrote:
>
>>> Hi!
>>> In terms of self-compiling I'm a beginner, so please excuse my
>>> ignorance if this is written somewhere in the manual, I couldn't find
>>> it easily at least:
>>> So far I put every procedure I consider to be useful enough for more
>>> than one task in its extra file, so that if it's called, IDL compiles
>>> it automatically, having the procedure and file name identical.
>>> But after a while, the number of files I have keeps growing.
>>> I wonder if there's another elegant way to keep things auto-compilable
>>> without me having to compile some kind of library before I start
>>> working on a task using my "library" of useful procedures.
>>> Am I missing something simple?
>>> Thanks for any hints and a nice weekend!
>>> Best regards,
>>> Michael
>
>> You should add your library directory to your !PATH - File->Preferences->Path.
>
>> Then you can call every procedure/function in the library without ever
>> having to compile it first. In fact, any directory that has any .pro
>> file in it is probably better off in !PATH. Top level directories,
>> anyway - thankfully IDL searches recursively.
>
>> Take care,
>> Chris
>
> Thanks so much for your fast answers, and I'm very sorry, I was too
> imprecise with my question, silly me.
> I am actually looking for a way to group similar procedures into one
> file to reduce the amount of library files, it's just harder to
> maintain.
> Is there a way to keep things still self-compilable when I put several
> procedures into one file?
>
> Cheers,
> Michael
Short answer - no.
Here, have a read of this, particularly the second half:
http://www.dfanning.com/tips/namefiles.html
Good luck,
Chris
|
|
|
Re: Self-compiling procedures [message #58730 is a reply to message #58729] |
Sat, 16 February 2008 14:18   |
maye
Messages: 29 Registered: June 2006
|
Junior Member |
|
|
On Feb 16, 11:05 pm, Spon <christoph.b...@gmail.com> wrote:
> On Feb 16, 6:47 pm, maye <kmichael....@googlemail.com> wrote:
>
>> Hi!
>> In terms of self-compiling I'm a beginner, so please excuse my
>> ignorance if this is written somewhere in the manual, I couldn't find
>> it easily at least:
>> So far I put every procedure I consider to be useful enough for more
>> than one task in its extra file, so that if it's called, IDL compiles
>> it automatically, having the procedure and file name identical.
>> But after a while, the number of files I have keeps growing.
>> I wonder if there's another elegant way to keep things auto-compilable
>> without me having to compile some kind of library before I start
>> working on a task using my "library" of useful procedures.
>> Am I missing something simple?
>> Thanks for any hints and a nice weekend!
>> Best regards,
>> Michael
>
> You should add your library directory to your !PATH - File->Preferences->Path.
>
> Then you can call every procedure/function in the library without ever
> having to compile it first. In fact, any directory that has any .pro
> file in it is probably better off in !PATH. Top level directories,
> anyway - thankfully IDL searches recursively.
>
> Take care,
> Chris
Thanks so much for your fast answers, and I'm very sorry, I was too
imprecise with my question, silly me.
I am actually looking for a way to group similar procedures into one
file to reduce the amount of library files, it's just harder to
maintain.
Is there a way to keep things still self-compilable when I put several
procedures into one file?
Cheers,
Michael
|
|
|
Re: Self-compiling procedures [message #58731 is a reply to message #58730] |
Sat, 16 February 2008 14:05   |
Spon
Messages: 178 Registered: September 2007
|
Senior Member |
|
|
On Feb 16, 6:47 pm, maye <kmichael....@googlemail.com> wrote:
> Hi!
> In terms of self-compiling I'm a beginner, so please excuse my
> ignorance if this is written somewhere in the manual, I couldn't find
> it easily at least:
> So far I put every procedure I consider to be useful enough for more
> than one task in its extra file, so that if it's called, IDL compiles
> it automatically, having the procedure and file name identical.
> But after a while, the number of files I have keeps growing.
> I wonder if there's another elegant way to keep things auto-compilable
> without me having to compile some kind of library before I start
> working on a task using my "library" of useful procedures.
> Am I missing something simple?
> Thanks for any hints and a nice weekend!
> Best regards,
> Michael
You should add your library directory to your !PATH - File-
> Preferences->Path.
Then you can call every procedure/function in the library without ever
having to compile it first. In fact, any directory that has any .pro
file in it is probably better off in !PATH. Top level directories,
anyway - thankfully IDL searches recursively.
Take care,
Chris
|
|
|
Re: Self-compiling procedures [message #58732 is a reply to message #58731] |
Sat, 16 February 2008 13:51   |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
On Feb 16, 12:47 pm, maye <kmichael....@googlemail.com> wrote:
> Hi!
> In terms of self-compiling I'm a beginner, so please excuse my
> ignorance if this is written somewhere in the manual, I couldn't find
> it easily at least:
> So far I put every procedure I consider to be useful enough for more
> than one task in its extra file, so that if it's called, IDL compiles
> it automatically, having the procedure and file name identical.
> But after a while, the number of files I have keeps growing.
> I wonder if there's another elegant way to keep things auto-compilable
> without me having to compile some kind of library before I start
> working on a task using my "library" of useful procedures.
> Am I missing something simple?
> Thanks for any hints and a nice weekend!
> Best regards,
> Michael
I think you've got it. Just as long as they are in the path, you can
just:
1- write a new procedure(s) that needs some of the library functions.
2- compile the new procedure(s)
3- resolve_all
I think that's the "most elegant" - the compilation is really fast,
anyways.
|
|
|
Re: Self-compiling procedures [message #58808 is a reply to message #58722] |
Tue, 19 February 2008 01:29  |
maye
Messages: 29 Registered: June 2006
|
Junior Member |
|
|
On Feb 18, 9:55 am, Maarten <maarten.sn...@knmi.nl> wrote:
> On Feb 16, 11:50 pm, Michael Aye <kmichael....@googlemail.com> wrote:
>
>
>
>> On Feb 16, 11:30 pm, Spon <christoph.b...@gmail.com> wrote:
>>> On Feb 16, 10:18 pm, maye <kmichael....@googlemail.com> wrote:
>>>> Thanks so much for your fast answers, and I'm very sorry, I was too
>>>> imprecise with my question, silly me.
>>>> I am actually looking for a way to group similar procedures into one
>>>> file to reduce the amount of library files, it's just harder to
>>>> maintain.
>>>> Is there a way to keep things still self-compilable when I put several
>>>> procedures into one file?
>>> Short answer - no.
>>> Here, have a read of this, particularly the second half:
>>> http://www.dfanning.com/tips/namefiles.html
>> And I got an idea: I could at least sort things by subfolders. As IDL
>> parses recursively - as it was mentioned before - I can put related
>> procedures together.
>> Thanks for your hints.
>
> If the functions are truly related, you may want to investigate the
> use of object programming. The IDL manual on the subject is quite
> horrible - it assumes you want to use their object graphics and write
> user interfaces in IDL (yuck). But as far as grouping related
> function, it is a powerful concept. Be prepared to dive into pointers
> though.
>
> Maarten
Yes, saw the object stuff already, but wondered, as you said, if
that's only there for object graphics or if there's more use to it. So
it's a good point.
Which reminds me of another question since IDL 7.0: What's ITT's idea
now for graphical UI's?
And are there actually ways to do the UI e.g. with QT Designer or with
WXWindowx/WxPython and put it on top of IDL routines? I guess, then
one has to start with all that importing stuff and doing it in C/C++
using some libraries for import?
Regards,
Michael
|
|
|