[GOODIE] - really, really basic RTF writer

Chris Cunningham csque0 at lycos.com
Thu Dec 18 17:59:27 UTC 2003


This is a really basic RTF writer that I'm using (i.e. it does what I want it too).  It will write text output, and table output, with little other functionality.  Here's an example of using it (all the functionality):


file _ CrLfFileStream newFileNamed: 'Test.rtf'.
rtf _ RTFCore on: file.
rtf
	writeBasicHeader;
	nextPutAll: 'This is a test RTF Document.'; cr;
	tableHeader: #( 'Column 1' 'Column 2');
	tableRow: #( 'Data 1' 'Data 2' );
	nextPutAll: 'Above is a table with headers; below is a table without.'; cr;
	tableRow: #( 'D1' 'D2' 'D3' 'D4' );
	finishDocument.
file close.





____________________________________________________________
Free Poetry Contest. Win $10,000. Submit your poem @ Poetry.com!
http://ad.doubleclick.net/clk;6750922;3807821;l?http://www.poetry.com/contest/contest.asp?Suite=A59101
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/x-zip-compressed
Size: 2176 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031218/d71be663/attachment.bin


More information about the Squeak-dev mailing list