home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
utilities
/
f
/
formdraw
/
Example4
/
!Receipt
/
!Help
< prev
next >
Wrap
Text File
|
1996-11-29
|
2KB
|
41 lines
====================================================
!Receipt
by Kell Gatherer
====================================================
This application demonstrates the use of !FormDraw.
!Receipt in itself is an extremely simple application, allowing the input of
an address and a total and not much else. It doesn't have the ability to
save the receipt or even change the VAT rate!
More to the point, !Receipt doesn't have any complicated print routines:
these are handled "invisibly" by !FormDraw.
Clicking on the "Save" icon issues the command
*WimpTask FormDraw:!Run Receipt:DrawFile Receipt:TextFile -S
which causes !FormDraw to run, load both files, process them, and open a
save box. Saving the Draw file to another application or the filer causes
!FormDraw to quit.
Similarly clicking on the Print icon issues the command
*WimpTask FormDraw:!Run Receipt:DrawFile Receipt:TextFile -P
which causes !FormDraw to run and send the output file to the printer
driver. The printer driver loads !Draw which prints the file.
The only other talent that !Receipt possesses is the ability to format
figures. In fact all numerals in a properly designed font are the same
width, and the space in a proportional font should be exactly half the width
of the numerals. So !Receipt places the correct number of double-spaces in
front of a numeral to make it line up with the others.
!Receipt should be simple to adapt to other uses: alter the window icons and
alter the Draw file and with just a little effort you'll have a completely
different application.