[BUG][Q] Form saving and reloading

Yisrael Lowenstein gte356h at prism.gatech.edu
Wed Apr 24 16:11:52 UTC 2002

> The 2 gets written by DisplayObject>>writeOnFileNamed:, e.g.

what if you want to just save a Form file without converting it to a
dispay object?  shouldn't there be an easy way to do that? perhaps
something like:

writeFormFileNamed: fName  "Display writeFormFileNamed: 'display'"
	| fileName f |

	((fileName _ fName) asUppercase endsWith: '.FORM')
		ifFalse: [fileName _ fName , '.FORM'].

	f _ (FileStream newFileNamed: fileName) binary.

	"add this so that Form fromFileNamed: will recognize it"
	f nextPut: 2.

	"write it out"
	self writeOn: f.

	"close it"
	f close

 o      |Yisrael Lowenstein: Computer Science Master's Student & Squeaker
   ()  o|lushi at bigfoot.com; gte356h at prism.gatech.edu; lushi at cc.gatech.edu
o_/||\/ |"Before you criticize a man, walk a mile in his shoes. That way
   ||   | when you do criticize him, you'll be a mile away and have his
  _/\_  | shoes." - Unknown                    AIM: YisraelL  ICQ: 1037061
  Class Schedule: http://www.prism.gatech.edu/~gte356h/schedule/

More information about the Squeak-dev mailing list