home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / f / formdraw / Example4 / !Receipt / !Help < prev    next >
Text File  |  1996-11-29  |  2KB  |  41 lines

  1. ====================================================
  2.  
  3. !Receipt
  4.  
  5. by Kell Gatherer
  6.  
  7. ====================================================
  8.  
  9. This application demonstrates the use of !FormDraw.
  10.  
  11. !Receipt in itself is an extremely simple application, allowing the input of
  12. an address and a total and not much else. It doesn't have the ability to
  13. save the receipt or even change the VAT rate!
  14.  
  15. More to the point, !Receipt doesn't have any complicated print routines:
  16. these are handled "invisibly" by !FormDraw.
  17.  
  18. Clicking on the "Save" icon issues the command
  19.  
  20. *WimpTask FormDraw:!Run Receipt:DrawFile Receipt:TextFile -S
  21.  
  22. which causes !FormDraw to run, load both files, process them, and open a
  23. save box. Saving the Draw file to another application or the filer causes
  24. !FormDraw to quit.
  25.  
  26. Similarly clicking on the Print icon issues the command
  27.  
  28. *WimpTask FormDraw:!Run Receipt:DrawFile Receipt:TextFile -P
  29.  
  30. which causes !FormDraw to run and send the output file to the printer
  31. driver. The printer driver loads !Draw which prints the file.
  32.  
  33. The only other talent that !Receipt possesses is the ability to format
  34. figures. In fact all numerals in a properly designed font are the same
  35. width, and the space in a proportional font should be exactly half the width
  36. of the numerals. So !Receipt places the correct number of double-spaces in
  37. front of a numeral to make it line up with the others.
  38.  
  39. !Receipt should be simple to adapt to other uses: alter the window icons and
  40. alter the Draw file and with just a little effort you'll have a completely
  41. different application.