PRINTER device changed in IDL 6 [message #38317] |
Sat, 28 February 2004 08:52 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Folks,
I have been getting odd e-mail from folks complaining about
programs that have been working for years. I've traced it
back to an unannounced change in the PRINTER device in IDL 6.0.
I'm trying now to see how widespread this phenomenon is before
I report the problem to RSI.
Here is the test program:
PRO Test
thisDevice = !D.Name
Set_Plot, 'PRINTER'
TVLCT, 255, 255, 0, 200
Set_Plot, thisDevice
END
This code runs fine in all versions of IDL prior to 6.0.
But it fails in 6.0 (on both my Windows machines, at least)
with the following error:
% TVLCT: Error creating device colortable.
Oddly, this program does not cause an error the FIRST time
it is run in a new IDL session, only on subsequent times!!
Very strange.
Anyway, it is the kind of thing that drives programmers
nuts, because it means if your programs are going to
work transparently across devices, you now have to
protect all TVLCT calls to be sure you are not in the
PRINTER device. This is *surely* not what RSI has in
mind. :-)
(Even if IDL isn't going to allow you to change PRINTER
colors once you copy them into the device from somewhere
else, a limitation I have hated but worked around for
several years, not allowing you to use a TVLCT command
while in the PRINTER device is going to make it next to
impossible to write general programs that can be sent
to both the printer and to the display device. )
Does anyone see this on non-Windows machines? Thanks.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|