Re: Programs that Work on 24-bit Color Displays (Long) [message #13342] |
Mon, 09 November 1998 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Hi Folks,
Gosh, I like this newsgroup. Post a simple little program
and everybody in the world jumps in to help you debug it. :-)
Liam Gumley was on top of things this morning and downloaded
my highly praised (*&@*!) XCOLORS program. Here is an
excerpt from his e-mail and my response:
************************************************************
Hi Liam,
You write:
> (1) 'Cancel' button oddity
> Start xcolors, drag the 'Stretch Bottom' slider to the right,
> then hit 'Cancel'. Start xcolors again, and note the compressed
> color table. Perhap 'Cancel' should restore the color table as
> it was at startup, regardless of slider movement.
Yikes. I should have seen this problem when I fixed the gamma
function the other day. It is the same problem. Fixed now. I hadn't
looked at this program for a long time, but when I went back in to
fix it a couple of weeks ago I was quite surprised to see my earliest
ideas about passing events around in widget programs worked out
here. I wouldn't write this program this way now, but it was interesting
to see how my ideas have evolved.
> (2) Notifying other widgets
> It seems like external widgets identified by the NOTIFYID keyword are
> notified during slider drags. I have an application which has to do
> quite a lot to refresh the image, and as a result it's a little slow to update.
> Would it make sense to only notify external widgets when a slider drag stops?
Since I always run this program on Windows machines, I didn't even
realize the DRAG keyword was set! This was probably a hold-over from
the old XLOADCT program I used as a model. I've fixed this so that
colors are updated only at the end of the drag. If you like the old
behavior, set the new DRAG keyword.
> (3) Button names (purely personal preference here!)
> The only thing I've changed is the order and naming of the buttons - I
prefer 'OK' and 'Cancel'.
Too set in my ways to change this. Sorry. :-)
You can find the newest version here:
ftp://ftp.dfanning.com/pub/dfanning/outgoing/idl_examples/xc olors.pro
************************************************************
Cheers,
David
----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
|