home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / tcl / tcl_1 / !Hist_!Help < prev    next >
Encoding:
Text File  |  1996-03-23  |  1.4 KB  |  34 lines

  1. Hist - shade demonstration program
  2.  
  3. This plots simple histograms. Drag files containing numbers separated by
  4. spaces newlines or commas to the hist icon.
  5.  
  6. The filer needs to have seen the !Tcl directory before it will run
  7. It needs RISCOS 3.1 or greater.
  8.  
  9. Suitable example data is contained in the file !Hist.Data. It was generated
  10. by the tclsh script "makedata".
  11.  
  12. ================================================================================
  13.  
  14. The program gives a simple example of how to save draw files in shade.
  15. It illustrates how to use tags, so that the same dialog box can be used from
  16. more than one draw window.
  17.  
  18. The dialog box saveBox calls "savedrag" if the icon is dragged, and "saveclick"
  19. if the OK button is clicked. It is attached to the diagram menu in the call
  20. to w_draw diag$diag create in procedure "dragproc". The menu entry has both a
  21. dialog box and a click item. Clicking on it calls procedure "saveMclick". This
  22. saves if the filename has been set already, and opens the box if it has not.
  23.  
  24. Notice draw windows are created with names diag1 diag2 ...
  25.  
  26. "savedrag" just calls the w_draw <name> save command with the supplied filename
  27. and window name.
  28.  
  29. It saves the filename in a global array entry so that it can be reused.
  30.  
  31. This array entry is initialised to the default in the "dragproc" procedure.
  32.  
  33. "saveclick" first checks that the supplied filename contains a '.' .
  34.