'Open Declaration' finds the wrong instance of a routine [message #85168] |
Wed, 10 July 2013 11:03  |
BillG
Messages: 6 Registered: March 2007
|
Junior Member |
|
|
The idl workbench has a convenient feature: in the editor, if you right-click on a call to a procedure and select "Open Declaration", idl will open that procedure in a new window. However, it doesn't always find the correct instance of that procedure. Details below.
I have a project that contains multiple copies of an idl procedure calc_a.pro (see diagram below.)
- Only one copy of calc_a is in !path.
- The routine calc_b.pro calls calc_a.
- In calc_b.pro, if I right-click on the call to calc_a and select "Open Declaration", it opens \project\old\calc_a.pro not \project\proc.calc_a.pro.
- However, 'help,/source' shows that the desired copy of calc_a.pro has been compiled.
How do I prevent IDL from opening the wrong copy of calc_a.pro? The different copies of calc_a.pro may be different leading to confusion or worse.
Notes:
- C:\MyProject\old is ***not*** in !path nor is './'
- Project>Properties>IDL Project Properties>"Update IDL path when project is opened or closed" is un-checked.
- The tab "Problems" shows
"Duplicate Routine: calc_a calc_a.pro C:\MyProject\old
The problem does not appear to be with !path, but I can't find any other settings or preferences that control this behavior.
--------------------------------------
Project structure:
\MyProject
\proc
calc_a.pro
calc_b.pro
\old
calc_a.pro
IDL> print, !path
C:\(idl stuff);C:\MyProject\proc
IDL> help,/source
...
...
calc_a C:\MyProject\proc\calc_a.pro
...
idl 8.2.2
Windows 7 pro
-----------------------------------------
Any suggestions?
Cheers,
Bill Gallery
National Environmental Observatory Network (NEON) Inc.
Boulder, CO
|
|
|
Re: 'Open Declaration' finds the wrong instance of a routine [message #85171 is a reply to message #85168] |
Wed, 10 July 2013 11:21   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Bill Gallery writes:
>
> The idl workbench has a convenient feature: in the editor, if you right-click on a call to a procedure and select "Open Declaration", idl will open that procedure in a new window. However, it doesn't always find the correct instance of that procedure. Details below.
>
> I have a project that contains multiple copies of an idl procedure calc_a.pro (see diagram below.)
> - Only one copy of calc_a is in !path.
> - The routine calc_b.pro calls calc_a.
> - In calc_b.pro, if I right-click on the call to calc_a and select "Open Declaration", it opens \project\old\calc_a.pro not \project\proc.calc_a.pro.
> - However, 'help,/source' shows that the desired copy of calc_a.pro has been compiled.
>
> How do I prevent IDL from opening the wrong copy of calc_a.pro? The different copies of calc_a.pro may be different leading to confusion or worse.
>
> Notes:
> - C:\MyProject\old is ***not*** in !path nor is './'
> - Project>Properties>IDL Project Properties>"Update IDL path when project is opened or closed" is un-checked.
> - The tab "Problems" shows
> "Duplicate Routine: calc_a calc_a.pro C:\MyProject\old
>
> The problem does not appear to be with !path, but I can't find any other settings or preferences that control this behavior.
>
> Any suggestions?
I would say both directories MUST be on your IDL path. ExelisVis is not
the NSA, they aren't scrubbing your hard drive looking for duplicate
files. They are looking in your IDL path.
If you print !Path, are you *sure* you don't see the old directory
there?
I suppose it is possible they search every directory in the project
directory. My project directory and my IDL directory are generally a
long ways from one another, which may explain why I've never seen
anything like this. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
Re: 'Open Declaration' finds the wrong instance of a routine [message #85182 is a reply to message #85171] |
Wed, 10 July 2013 13:09   |
BillG
Messages: 6 Registered: March 2007
|
Junior Member |
|
|
On Wednesday, July 10, 2013 12:21:11 PM UTC-6, David Fanning wrote:
> Bill Gallery writes:
>
>
>
>>
>
>> The idl workbench has a convenient feature: in the editor, if you right-click on a call to a procedure and select "Open Declaration", idl will open that procedure in a new window. However, it doesn't always find the correct instance of that procedure. Details below.
>
>>
>
>> I have a project that contains multiple copies of an idl procedure calc_a.pro (see diagram below.)
>
>> - Only one copy of calc_a is in !path.
>
>> - The routine calc_b.pro calls calc_a.
>
>> - In calc_b.pro, if I right-click on the call to calc_a and select "Open Declaration", it opens \project\old\calc_a.pro not \project\proc.calc_a.pro.
>
>> - However, 'help,/source' shows that the desired copy of calc_a.pro has been compiled.
>
>>
>
>> How do I prevent IDL from opening the wrong copy of calc_a.pro? The different copies of calc_a.pro may be different leading to confusion or worse.
>
>>
>
>> Notes:
>
>> - C:\MyProject\old is ***not*** in !path nor is './'
>
>> - Project>Properties>IDL Project Properties>"Update IDL path when project is opened or closed" is un-checked.
>
>> - The tab "Problems" shows
>
>> "Duplicate Routine: calc_a calc_a.pro C:\MyProject\old
>
>>
>
>> The problem does not appear to be with !path, but I can't find any other settings or preferences that control this behavior.
>
>>
>
>> Any suggestions?
>
>
>
> I would say both directories MUST be on your IDL path. ExelisVis is not
>
> the NSA, they aren't scrubbing your hard drive looking for duplicate
>
> files. They are looking in your IDL path.
>
>
>
> If you print !Path, are you *sure* you don't see the old directory
>
> there?
>
>
>
> I suppose it is possible they search every directory in the project
>
> directory. My project directory and my IDL directory are generally a
>
> long ways from one another, which may explain why I've never seen
>
> anything like this. :-)
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
David,
Neither the directory \MyProject\old nor any oblique reference to it (e.g., '.\') are in !path. Furthermore, idl finds the correct version (\MyProject\proc\calc_a.pro) when compiling, e.g., resolve,/all.
Its a mystery.
Bill
|
|
|
Re: 'Open Declaration' finds the wrong instance of a routine [message #85225 is a reply to message #85182] |
Wed, 17 July 2013 07:31  |
Rob Klooster
Messages: 18 Registered: February 2013
|
Junior Member |
|
|
Op woensdag 10 juli 2013 22:09:17 UTC+2 schreef Bill Gallery het volgende:
> On Wednesday, July 10, 2013 12:21:11 PM UTC-6, David Fanning wrote:
>
>> Bill Gallery writes:
>
>>
>
>>
>
>>
>
>>>
>
>>
>
>>> The idl workbench has a convenient feature: in the editor, if you right-click on a call to a procedure and select "Open Declaration", idl will open that procedure in a new window. However, it doesn't always find the correct instance of that procedure. Details below.
>
>>
>
>>>
>
>>
>
>>> I have a project that contains multiple copies of an idl procedure calc_a.pro (see diagram below.)
>
>>
>
>>> - Only one copy of calc_a is in !path.
>
>>
>
>>> - The routine calc_b.pro calls calc_a.
>
>>
>
>>> - In calc_b.pro, if I right-click on the call to calc_a and select "Open Declaration", it opens \project\old\calc_a.pro not \project\proc.calc_a.pro.
>
>>
>
>>> - However, 'help,/source' shows that the desired copy of calc_a.pro has been compiled.
>
>>
>
>>>
>
>>
>
>>> How do I prevent IDL from opening the wrong copy of calc_a.pro? The different copies of calc_a.pro may be different leading to confusion or worse.
>
>>
>
>>>
>
>>
>
>>> Notes:
>
>>
>
>>> - C:\MyProject\old is ***not*** in !path nor is './'
>
>>
>
>>> - Project>Properties>IDL Project Properties>"Update IDL path when project is opened or closed" is un-checked.
>
>>
>
>>> - The tab "Problems" shows
>
>>
>
>>> "Duplicate Routine: calc_a calc_a.pro C:\MyProject\old
>
>>
>
>>>
>
>>
>
>>> The problem does not appear to be with !path, but I can't find any other settings or preferences that control this behavior.
>
>>
>
>>>
>
>>
>
>>> Any suggestions?
>
>>
>
>>
>
>>
>
>> I would say both directories MUST be on your IDL path. ExelisVis is not
>
>>
>
>> the NSA, they aren't scrubbing your hard drive looking for duplicate
>
>>
>
>> files. They are looking in your IDL path.
>
>>
>
>>
>
>>
>
>> If you print !Path, are you *sure* you don't see the old directory
>
>>
>
>> there?
>
>>
>
>>
>
>>
>
>> I suppose it is possible they search every directory in the project
>
>>
>
>> directory. My project directory and my IDL directory are generally a
>
>>
>
>> long ways from one another, which may explain why I've never seen
>
>>
>
>> anything like this. :-)
>
>>
>
>>
>
>>
>
>> Cheers,
>
>>
>
>>
>
>>
>
>> David
>
>>
>
>> --
>
>>
>
>> David Fanning, Ph.D.
>
>>
>
>> Fanning Software Consulting, Inc.
>
>>
>
>> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
>>
>
>> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
>
>
>
> David,
>
>
>
> Neither the directory \MyProject\old nor any oblique reference to it (e.g., '.\') are in !path. Furthermore, idl finds the correct version (\MyProject\proc\calc_a.pro) when compiling, e.g., resolve,/all.
>
>
>
> Its a mystery.
>
>
>
> Bill
Just a guess, but there might be a hard-coded reference to that routine in the .metadata folder inside your project.
Rob.
|
|
|