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

Re: IDL 5.2 GUI Builder Tutorial ?



In article <7ij5ea$ckr$1@nnrp1.deja.com>, rmlongfield@my-deja.com wrote:

>Hi Karl and all,
>        I haven't seen the GUI tool but when I first started with widgets, I
>used WIDED, which I thought was useful at least in getting used to
>widgets and how the programs should look.  
...

Let me jump on this bandwagon with a rant of my own. I just spent a year
dealing with a very disgusting usage of WIDED. Our tax dollars (in the
U.S.) have been used to create this:

base1 = WIDGET_BASE(base0, /ROW)
label1 = WIDGET_LABEL(base1, VALUE = 'Input L0 file   ')    
gwid.ifile = WIDGET_TEXT(base1, /EDIT, XSIZE = 40, $ 
                 VALUE = '')    
gwid.select = WIDGET_BUTTON(base1, VALUE='Select')

base1 = WIDGET_BASE(base0, /ROW)
label1 = WIDGET_LABEL(base1, VALUE = 'Output directory')    
gwid.outdir = WIDGET_TEXT(base1, /EDIT, XSIZE = 40, VALUE = './')   
gwid.oselect = WIDGET_BUTTON(base1, VALUE='Select')

label1 = WIDGET_LABEL (base0, VALUE=' ')    

base1 = WIDGET_BASE(base0, /ROW)
label1 = WIDGET_LABEL(base1, VALUE="Log file (for submit only) :")
gwid.logfile = WIDGET_TEXT(base1, /EDIT, VALUE='/dev/null', XS=35)

You might be thinking "Oh that's just someone's quick attempt at
understanding something." You'd be wrong, because this is production code
being used in the SeaDAS project by NASA and released to the public. This
is a random file selected from 3 MB of this crap. I was the lucky person
that had to add another satellite into this mess for a different company.
It took a hell of a lot longer than it should have because of this useless
naming. If you ever think your project will be used by someone other than
yourself, think about the savings you could accomplish by doing the right
thing from the start. Unfortunately, NASA has created a sinkhole and ought
to be embarrassed for ever letting this project out in its current form.
This example came from a file of 160+ lines with two lines of generic
comments. 

Before I go tilt at another windmill, let me suggest an IDL Style Guide
that I put together earlier this year. It was written about 4 years ago,
but cleaned up and put on the web in January. It's available at
<http://www.ivsoftware.com/IDL_Style.html>. I'd like to get some feedback
to make it an acceptable document for others to use, as well.

-- 
Mike Schienle                                 Interactive Visuals, Inc.
mgs@ivsoftware.com                  Remote Sensing and Image Processing
http://www.ivsoftware.com/         Analysis and Application Development