From: Neil T. <nt...@us...> - 2006-08-13 23:50:27
|
Update of /cvsroot/pgsqlformac/pgCocoaDB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28044 Modified Files: ChangeLog ExplorerModel.h ExplorerModel.m Log Message: Explorer API change to accomodate preferences. Index: ExplorerModel.h =================================================================== RCS file: /cvsroot/pgsqlformac/pgCocoaDB/ExplorerModel.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ExplorerModel.h 13 May 2006 18:04:00 -0000 1.3 --- ExplorerModel.h 13 Aug 2006 23:50:24 -0000 1.4 *************** *** 18,28 **** Connection * connection; Schema * schema; ! bool showInformationSchema; //TODO ! bool showPGCatalog; //TODO ! bool showPGToast; //TODO ! bool showPGTemps; //TODO } - (id)initWithConnection:(Connection *) aConnection; - (Schema *)schema; - (bool)showInformationSchema; --- 18,32 ---- Connection * connection; Schema * schema; ! bool showInformationSchema; ! bool showPGCatalog; ! bool showPGToast; ! bool showPGTemps; } - (id)initWithConnection:(Connection *) aConnection; + - (id)initRebuilding; + - (void)buildSchema; + + -(void)setSchema:(Schema *)newSchema; - (Schema *)schema; - (bool)showInformationSchema; Index: ExplorerModel.m =================================================================== RCS file: /cvsroot/pgsqlformac/pgCocoaDB/ExplorerModel.m,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ExplorerModel.m 12 Aug 2006 16:38:16 -0000 1.9 --- ExplorerModel.m 13 Aug 2006 23:50:24 -0000 1.10 *************** *** 278,281 **** --- 278,297 ---- } + - (id)initRebuilding + { + [super init]; + + schema = nil; + connection = nil; + rootNode = [[ExplorerNode alloc] init]; + [rootNode setName: @"Rebuilding"]; + [rootNode setBaseTable: @""]; + [rootNode setExplorerType:@"Database"]; + [rootNode setParent:nil]; + [rootNode setOID:0]; + + return self; + } + - (id)initWithConnection:(Connection *) theConnection *************** *** 283,300 **** [super init]; showInformationSchema = TRUE; showPGCatalog = TRUE; showPGToast = FALSE; showPGTemps = FALSE; ! ExplorerNode * newNode; ExplorerNode * newChild; RecordSet * results; ! schema = [[Schema alloc] initWithConnection:theConnection]; // set database level rootNode = [[ExplorerNode alloc] init]; ! [rootNode setName: [theConnection currentDatabase]]; [rootNode setBaseTable: @""]; [rootNode setExplorerType:@"Database"]; --- 299,327 ---- [super init]; + connection = theConnection; + schema = [[Schema alloc] initWithConnection:connection]; showInformationSchema = TRUE; showPGCatalog = TRUE; showPGToast = FALSE; showPGTemps = FALSE; ! return self; ! } ! ! ! - (void)buildSchema ! { ExplorerNode * newNode; ExplorerNode * newChild; RecordSet * results; ! if ((connection == nil) || (schema == nil)) ! { ! NSLog(@"Attempted to buildSchema without proper init."); ! return; ! } // set database level rootNode = [[ExplorerNode alloc] init]; ! [rootNode setName: [connection currentDatabase]]; [rootNode setBaseTable: @""]; [rootNode setExplorerType:@"Database"]; *************** *** 381,385 **** [newNode release]; } ! return self; } --- 408,412 ---- [newNode release]; } ! return; } *************** *** 392,395 **** --- 419,429 ---- } + -(void)setSchema:(Schema *)newSchema + { + [schema release]; + schema = newSchema; + [schema retain]; + } + // accessor methods - (Schema *)schema Index: ChangeLog =================================================================== RCS file: /cvsroot/pgsqlformac/pgCocoaDB/ChangeLog,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ChangeLog 12 Aug 2006 16:38:16 -0000 1.14 --- ChangeLog 13 Aug 2006 23:50:24 -0000 1.15 *************** *** 1,2 **** --- 1,8 ---- + 2006-08-12 11:38 ntiffin + + * ChangeLog, Connection.m, Databases.m, ExplorerModel.m, + ExplorerNode.m, Field.m, Fields.m, RecordSet.m, Schema.m, + Table.m: More memory cleanup. + 2006-08-11 13:01 ntiffin |