[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Comm... err, alternative?



Pavel Romashkin (promashkin@cmdl.noaa.gov) writes:

> I have a short question. When you have several (identical, object
> plotting only) widget windows, how do you find out which one is the
> topmost without using a common block or defining a main-level variable?
> I use focus events all right, but I have not figure out where to keep
> the resulting information.
> I certainly will use a pointer if all those daughter windows are
> generated from a parent widget program. But how do I do this if I create
> them from a command line?

The more relevant question, it seems to me, is why
in the world would you care? Multiple windows on the
display are going to be mixed up by the user anyway.
Why try to go to any effort to order them?

Enquiring minds want to know... :-)

Speaking of keyboard focus events. I'm writing the
"color protection" section of my new widget programming
chapter even as we speak. I've used a variety of color
protection schemes in the past, but this time I thought
I would teach people to use keyboard focus events,
since these seemed to me to be fairly "automatic".

In other words, you don't have to do a whole lot
of coding to make it work. Whenever you get a 
keyboard focus event, load the program's color 
vectors and redraw the graphic display if you are
on a 24-bit display. Perfect.

But...

These things seem just a bit overzealous to me.
There are a LOT of keyboard focus events, apparently,
because I find them doing a LOT of drawing. They are
making me nervous. I don't like anyone who is so *eager*. :-(

I'm thinking of going back to something a little more
my own speed. 

Has anyone else had this experience? What do you use
for color protection? My only requirement is that it
be device-depth and device-decomposed state independent.

Cheers,

David

-- 
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