22 Nov 2012 09:03 AM |
|
Hi. I've noticed another problem with 8.2.1 DE that was non-existent in 7.1 There seems to be an issue with copying lines of code from a file open inside the editor into the IDL console. I often like to have programs open in the editor and I debug by pasting various lines into the console and doing some real-time manipulations.
However, when I paste multiple lines of code into the console, they do not run. They appear to paste just fine but the actual code doesn't carry out. And when I press the up arrow to scroll through my console/command history, the lines don't exist, like they were never pasted at all. I have to copy one line at a time into the console to get it to work, which is cumbersome and tedious.
Am I missing a setting somewhere in 8.2.1 or is this a bug? Anyone else experience this or have a solution?
I'm running IDL 8.2.1 on Max OS X 10.8.2 (ML).
|
|
|
|
Deleted User New Member
Posts:  
27 Nov 2012 12:27 PM |
|
Hi Havok,
I was wondering what could be an example to try. Because I have tried with 25 lines of code copied into the IDL 8.2.1 prompt (in Mac OS X 10.8.2) and they work fine.
How many lines of code does the problem becomes evident?.
Cheers,
Fernandon
|
|
|
|
Deleted User New Member
Posts:  
08 Feb 2013 08:48 AM |
|
This is something that's been bothering me for a while about the IDE, I've been working around it, but if there is a fix, please help. A quick example is:
x=findgen(720)
y=x*0.
z=y
.r
for ic=0,100 do begin
y[ic]=cos(!dtor*x[ic])
z[ic]=cos(!dtor*x[ic])
endfor
end
Please note that I realize that this is brain damaged code, but it demonstrates the problem. If I cut the entire block and paste it into the console, it doesn't work. It doesn't recognize the 'end' as an end, and if I just type 'end', it gives a syntax error. If I cut out each line at a time and paste them it, it functions correctly (this is the workaround). The problem only manifests itself when '.r' is used.
If there is something that I can do to fix this I'd love to know what it is.
Bob
|
|
|
|
Deleted User New Member
Posts:  
08 Feb 2013 04:19 PM |
|
Hi Bob,
This way of working was designed to work better with IDL command line instead of from inside the new IDL Workbench (post IDL 7.x). In IDL 8.x the command line and the console fused, and this particular way of working does not behave as before. So, my recommendation is:
1- or use IDL Command line version (no Workbench)
2- or type multiple lines into one line, in this way, without using .RUN:
x=findgen(720)
y=x*0.
z=y
for ic=0,100 do begin & y[ic]=cos(!dtor*x[ic]) & z[ic]=cos(!dtor*x[ic]) & endfor
3- Or as you said, enter line by line of the set of multiple lines after having typed .RUN.
I hope this helps in your case.
Cheers,
Fernando
|
|
|
|
Deleted User New Member
Posts:  
08 Feb 2013 06:37 PM |
|
Actually no. this doesn't help. All you've given me are workarounds that I'm already using. I usually test stuff as I write it in the IDE. As it stands, it's a pain to test out code with large, multiline for or if blocks. Clearly, I could open a another window and run the IDL command line - but then I loose the integration with the code and the debugger. I'm back to where I was in version 3.
At this point, you've confirmed that the console window has some sort of feature that keeps it from acting like the command line. In fact, when I use .R, I can't even figure out what the console is trying to do.
I don't expect a fix in this version, but I would request that in the next redesign that thought be given to making .r and a set of pasted code work like it does in the command line version.
Bob
|
|
|
|
Deleted User New Member
Posts:  
04 Feb 2015 08:45 AM |
|
I have had the same problem as Brian describes in previous versions of idlde, but only on occasion. I now have IDL 8.4 (Build id: 20140927) and very often run into the problem that it doesn't even "take" a single line. I highlight a line in an editor; copy it (Cntr-C); paste it onto the command line (Cntr-V). It will show on the command line, I can press enter and it will give me a new prompt. However, the command does not get executed and is not in the command history. The way to get past this is to exit IDL and start it again. Not an acceptable solution. Anyone any suggestions?
|
|
|
|