| Re: Sorry! I made a mistake. [message #30374] |
Fri, 26 April 2002 21:41  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Weiqun Zhang (zhang@ucolick.org) writes:
> In the .Xdefaults file, I should put "idl.gr_visual: TrueColor" instead
> of "idl.gr_visual: True". Now it works. But there is still a problem I
> don't understand.
> (1) Which command is correct? "device, true=24" or "device,
> TrueColor=24". In David Fanning's book, it is "device, TrueColor=24".
> But I got error like this,
> IDL> window
> IDL> device, TrueColor=24
> % Keyword TRUECOLOR not allowed in call to: DEVICE
> I won't get error from "device, true=24", but it doesn't work.
It's DEVICE, TRUE_COLOR=24, of course. But, since keywords
can be abbreviated to as few a letters as makes them unique
for the command, most people use DEVICE, TRUE=24 in practice.
The fact that this isn't working is a worry. :-(
Are you certain you are executing this command *before*
you open a graphics window?
Cheers,
David
P.S. I'm pretty sure I corrected this typo in the book. Do you
happen to know what page you saw it on? :-)
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
|
| Re: Sorry! I made a mistake. [message #30519 is a reply to message #30374] |
Sat, 27 April 2002 12:10  |
Weiqun Zhang
Messages: 3 Registered: April 2002
|
Junior Member |
|
|
Thanks for your help.
> Are you certain you are executing this command *before*
> you open a graphics window?
Yes, I am. ".Xdefaults" can control the visual class. But if I start
with a class, I cannot change to another.
[zhang@dao:~/IDL]$ idl
IDL Version 5.5a (linux x86). (c) 2001, Research Systems, Inc.
IDL> device,get_visual_name=temp & print, temp
DirectColor
IDL> DEVICE, TRUE_COLOR=24
IDL> window
IDL> device,get_visual_name=temp & print, temp
DirectColor
IDL> exit
[zhang@dao:~/IDL]$ (change .Xdefaults)
[zhang@dao:~/IDL]$ idl
IDL> device, get_visual_name=temp & print, temp
TrueColor
IDL> device, Direct_Color=24
IDL> device, get_visual_name=temp & print, temp
TrueColor
> P.S. I'm pretty sure I corrected this typo in the book. Do you
> happen to know what page you saw it on? :-)
My copy of your book is the first version.
Cheers,
Weiqun
|
|
|
|