Re: Save 2D conversion matrix [message #46289 is a reply to message #46163] |
Wed, 09 November 2005 08:07   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Peter Albert writes:
> But without stretching this discussion too far I would still like to
> know why you chose to set the keyboard focus keyword to one. I repeated
> the exercise with the slow plot command, and well, I have to admit that
> dragging the window is actually not the problem (and several minutes
> was exaggerating ...). It is more that IDL remembers how often you hit
> the window with the mouse, and as I am a nervous person it often
> happend that I repeatedly moved the mouse pointer right across the draw
> widget while it was still processing the first event. Having finished,
> it processed the second, than the third, ... and so on. And while
> waiting I asked myself why it is necessary to update the plot command
> just when a keyboard event occurs... But I guess there was a good
> reason?
I don't know. Keyboard focus!? Off-hand I would say it
was to fix some kind of bug. I hardly *ever* use keyboard
focus. Let me see...
Ah, in the old days none of us had 24-bit graphics cards.
Hard to believe, but we had to choose 256 colors out of
the palette of millions available to us now. But, none of
us liked the same colors. And if I liked *this*, you
certainly liked *that*. But worst of all, when you switched
the color table to *that* my programs went all to hell because
when you switched colors, you switched it for everyone.
(Astronomers, apparently, still prefer this system.)
It was annoying as all get out. But since FSC_WINDOW was
designed to work in that environment, and since it didn't
know *anything* about what it was displaying, it had to
have some way to get the colors right for the program it
was displaying. Otherwise, the poor user would have to
be reloading his colors (what a good idea!) before he
counted on them, and it seemed like a fool's errand to
try to teach people to do that!
So I came up with this idea that I would just keep track
of what colors you were using when the program started
and just reload them when focus shifted to the FSC_WINDOW
window. (I can't really think of a good reason why I also
chose to draw the graphics again, but it probably had more
to do with a Copy-Paste operation than it did with clear
thinking.)
In any case, this is the first time in the 15 years since
I wrote the program that anyone ever told me it was a problem.
I'd probably just remove it. At least that is where I would
start, and see what happens.
I doubt I would make changes to FSC_Window myself, however.
It's too depressing to read code you wrote so long ago. It's
like looking at photos of yourself in the 1970's with the long
sideburns and mustache, standing there looking dopey with
your sickly paisley tie and mustard yellow shirt with the five
inch collars.
There are a LOT better ways to write that program today. Maybe
some day I'll get around to it. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|