RE: saving tables and user defined strings
RE: saving tables and user defined strings
- Subject: RE: saving tables and user defined strings
- From: "Stuppel, Searle @ San Diego Central" <email@hidden>
- Date: Tue, 21 Aug 2001 14:22:32 -0700
What it means is that you have a setup like this (and this is pseudocode
below, not the exact commands)
-(void)saveFileFunction
{
- pull up a dialog using the regular save function to get a filename/path
to save the file.
- check to make sure user chose a name and all is ok
- if yes:
NSString *saveString;
saveString = [saveString stringbyAppendingString:[myTable
NoOfRows]];
saveString = [saveString stringbyAppendingString:@"\t"];
saveString = [saveString stringbyAppendingString:[myTable
NoOfCols]];
saveString = [saveString stringbyAppendingString:@"\t\n"];
looping structure that reads each cell table and then puts it in as:
saveString = [saveString
stringbyAppendingString:CellIJustReadIn"];
saveString = [saveString stringbyAppendingString:@"\t"];
and at the end of the row: saveString = [saveString
stringbyAppendingString:@"\n"];
- save saveString to the file atomically:YES
For the loader, make it do the exact opposite thing, read in a loadString
and then break it up the same way you saved it.
searle
Searle Stuppel
CB Richard Ellis, Inc.
Direct: 858-546-4600
Fax: 858-546-4616
Toll Free: 800-334-9347
email@hidden
-----Original Message-----