comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: problem with color graph with idl 5.0 Win95 version
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: problem with color graph with idl 5.0 Win95 version [message #14183] Wed, 03 February 1999 00:00
rmlongfield is currently offline  rmlongfield
Messages: 68
Registered: August 1998
Member
In article <MPG.1120e75bda4a1f429896da@news.frii.com>,
davidf@dfanning.com (David Fanning) wrote:

> to know what color is associated with which index. The program
> CINDEX from my anonymous ftp site is useful for this purpose:
>
> ftp://ftp.dfanning.com/pub/dfanning/outgoing/misc/cindex.pro

Hi all,
I found this program very useful except for one problem.
I get an error message (IDl5.0 mipseb IRIX unix 5.0):
Keyword GET_VISUAL_DEPTH not allowed in call to: DEVICE

This occurs because I am still running IDL5.0 (it runs ok on another machine
with IDL5.1 installed). I cannot find documentation on this keyword (online
or on paper). My question is: Is there a check (hopefully not using an error
handler) which will tell me if this keyword is valid and, if not, use a
different method for determining the color structure? I have to bypass it
somehow. (I know, I know, there are already too many checks for the various
OS's and versions and colors)

Rose


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Re: problem with color graph with idl 5.0 Win95 version [message #14277 is a reply to message #14183] Wed, 03 February 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Rose (rmlongfield@my-dejanews.com) writes about my CINDEX
program:

> I found this program very useful except for one problem.
> I get an error message (IDl5.0 mipseb IRIX unix 5.0):
> Keyword GET_VISUAL_DEPTH not allowed in call to: DEVICE
>
> This occurs because I am still running IDL5.0 (it runs ok on another machine
> with IDL5.1 installed). I cannot find documentation on this keyword (online
> or on paper). My question is: Is there a check (hopefully not using an error
> handler) which will tell me if this keyword is valid and, if not, use a
> different method for determining the color structure? I have to bypass it
> somehow. (I know, I know, there are already too many checks for the various
> OS's and versions and colors)

This is all a bit complicated as you go through the 5.x
versions of IDL, since a number of bugs were fixed/introduced/fixed
that make it difficult to tell unambiguously and programmatically
how many colors you have on your display.

If you are running on a PC or Mac, however, and !D.N_Colors
is greater than or *equal to* 256, then you have a visual
depth greater than 8, which is usually what you want to
know. On a UNIX workstation, if !D.N_Colors is greater
than 256, you have a depth greater than 8.

Alas, I've just removed *all* references to !D.N_Colors
from the latest edition of my book and I've banished it
from all my programs as it makes my life so damn hard. :-(
Instead, I'm now using !D.Table_Size and these new keywords
to the DEVICE command (GET_VISUAL_DEPTH, GET_VISUAL_NAME,
GET_DECOMPOSED) to sort this color stuff out.

And I *always* encourage people to upgrade to the latest
version of IDL, even if it costs more money than you want
to spend. For me, it's a lot more expensive to spend all
my time writing code to work around bugs. :-)

Cheers,

David

P.S. !Version.Release can be used to write version-specific
error handling code. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: map_getdata
Next Topic: ISHFT in IDL 5.2 on OpenVMS 7.1

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:51:20 PDT 2025

Total time taken to generate the page: 0.00611 seconds