Re: "hyper" PS_FORM [message #10762 is a reply to message #10709] |
Mon, 19 January 1998 00:00   |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Norbert Hahn (hahn@hrz.tu-darmstadt.de) writes:
> Maybe I've overlooked it: How does ps_form center the printable area?
Poorly. :-(
PS_Form was one of the first really "useful" IDL widget
programs I ever wrote. I shamelessly copied it from a similar
version that I first saw in ENVI. Unlike the ENVI version
(I suspect, since I never saw the code) my version is terrible.
It is one of the worst widget programs I ever wrote. It is
a continual embarrassment to me that it is also one of the
most widely used. The worst thing about it is that everything
in it is hardcoded, especially the printable area.
I guess you could say that everything I know today about writing
modular widget programs that can be easily extended and maintained
I learned in response to this ill-tempered program. Maybe one of
the reasons I never find the time to re-write it correctly is that
I secretly like to have it around to remind me where I came from. :-)
I've been thinking about re-writing it for a long time to
incorporate other page sizes, but whenever I get some
free time other, higher priority tasks push their way into my
consciousness. Craig Markwardt finally got tired of me dragging
my heels and asked me if he could publish his solution. I'm
grateful for his help, but his use of a Common block gets
in the way of my wholehearted endorsement. :-)
Anyway, I have a number of ideas of how it "ought" to be
written. (And, frankly, it "ought" to be written as an
object.) One of these days I am going to have another go
at writing it correctly.
Cheers,
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|