From: Neil T. <nt...@us...> - 2006-09-18 17:55:02
|
Update of /cvsroot/pgsqlformac/pgCocoaDB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6615 Modified Files: ChangeLog ExplorerModel.h ExplorerModel.m Log Message: Fix bug in explorer not creating sql. Index: ExplorerModel.h =================================================================== RCS file: /cvsroot/pgsqlformac/pgCocoaDB/ExplorerModel.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ExplorerModel.h 14 Sep 2006 12:26:46 -0000 1.8 --- ExplorerModel.h 18 Sep 2006 17:54:56 -0000 1.9 *************** *** 13,17 **** #import "Schema.h" ! enum ThreadStatus { None, Running, Done, Error }; @interface ExplorerModel : NSObject --- 13,17 ---- #import "Schema.h" ! enum ExplorerThreadStatus { ExplorerNone, ExplorerRunning, ExplorerDone, ExplorerError }; @interface ExplorerModel : NSObject *************** *** 28,32 **** NSLock *explorerThreadStatusLock; ! enum ThreadStatus explorerThreadStatus; } --- 28,32 ---- NSLock *explorerThreadStatusLock; ! enum ExplorerThreadStatus explorerThreadStatus; } *************** *** 41,45 **** - (bool)showPGTemps; - (bool)showPublic; ! - (enum ThreadStatus)explorerThreadStatus; - (void)setShowInformationSchema:(bool)newValue; --- 41,45 ---- - (bool)showPGTemps; - (bool)showPublic; ! - (enum ExplorerThreadStatus)explorerThreadStatus; - (void)setShowInformationSchema:(bool)newValue; *************** *** 48,52 **** - (void)setShowPGTemps:(bool)newValue; - (void)setShowPublic:(bool)newValue; ! - (void)setExplorerThreadStatus:(enum ThreadStatus)newValue; // These methods get called because I am the datasource of the outline view. --- 48,52 ---- - (void)setShowPGTemps:(bool)newValue; - (void)setShowPublic:(bool)newValue; ! - (void)setExplorerThreadStatus:(enum ExplorerThreadStatus)newValue; // These methods get called because I am the datasource of the outline view. Index: ExplorerModel.m =================================================================== RCS file: /cvsroot/pgsqlformac/pgCocoaDB/ExplorerModel.m,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ExplorerModel.m 14 Sep 2006 12:26:46 -0000 1.17 --- ExplorerModel.m 18 Sep 2006 17:54:56 -0000 1.18 *************** *** 320,324 **** explorerThreadStatusLock = [[NSLock alloc] init]; ! explorerThreadStatus = None; showInformationSchema = TRUE; --- 320,324 ---- explorerThreadStatusLock = [[NSLock alloc] init]; ! explorerThreadStatus = ExplorerNone; showInformationSchema = TRUE; *************** *** 355,358 **** --- 355,359 ---- ExplorerNode * realRootNode; + [schema release]; schema = [[Schema alloc] initWithConnectionString:connectionString]; *************** *** 360,369 **** { NSLog(@"Schema init returned error."); ! [self setExplorerThreadStatus:Error]; return; } ! [self setExplorerThreadStatus:Running]; // set database level --- 361,370 ---- { NSLog(@"Schema init returned error."); ! [self setExplorerThreadStatus:ExplorerError]; return; } ! [self setExplorerThreadStatus:ExplorerRunning]; // set database level *************** *** 463,470 **** [rootNode autorelease]; rootNode = realRootNode; ! [self setExplorerThreadStatus:Done]; [(NSOutlineView *)anOutlineView reloadData]; - [schema release]; - schema = nil; [pool release]; [self release]; --- 464,469 ---- [rootNode autorelease]; rootNode = realRootNode; ! [self setExplorerThreadStatus:ExplorerDone]; [(NSOutlineView *)anOutlineView reloadData]; [pool release]; [self release]; *************** *** 520,526 **** } ! - (enum ThreadStatus)explorerThreadStatus { ! enum ThreadStatus status; [explorerThreadStatusLock lock]; --- 519,525 ---- } ! - (enum ExplorerThreadStatus)explorerThreadStatus { ! enum ExplorerThreadStatus status; [explorerThreadStatusLock lock]; *************** *** 555,559 **** } ! - (void)setExplorerThreadStatus:(enum ThreadStatus)newValue { [explorerThreadStatusLock lock]; --- 554,558 ---- } ! - (void)setExplorerThreadStatus:(enum ExplorerThreadStatus)newValue { [explorerThreadStatusLock lock]; *************** *** 571,575 **** return [rootNode childAtIndex:i]; } ! if([self explorerThreadStatus] != Done) { return 0; --- 570,574 ---- return [rootNode childAtIndex:i]; } ! if([self explorerThreadStatus] != ExplorerDone) { return 0; *************** *** 584,588 **** // Returns YES if the node has children ! if([self explorerThreadStatus] != Done) { return NO; --- 583,587 ---- // Returns YES if the node has children ! if([self explorerThreadStatus] != ExplorerDone) { return NO; *************** *** 600,604 **** return [rootNode childrenCount]; } ! if([self explorerThreadStatus] != Done) { return 0; --- 599,603 ---- return [rootNode childrenCount]; } ! if([self explorerThreadStatus] != ExplorerDone) { return 0; *************** *** 638,642 **** - (BOOL)printLog { ! if([self explorerThreadStatus] == Done) { [rootNode printLog:0]; --- 637,641 ---- - (BOOL)printLog { ! if([self explorerThreadStatus] == ExplorerDone) { [rootNode printLog:0]; Index: ChangeLog =================================================================== RCS file: /cvsroot/pgsqlformac/pgCocoaDB/ChangeLog,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** ChangeLog 14 Sep 2006 12:26:46 -0000 1.23 --- ChangeLog 18 Sep 2006 17:54:56 -0000 1.24 *************** *** 1,2 **** --- 1,14 ---- + 2006-09-14 07:26 ntiffin + + * ChangeLog, Connection.h, Connection.m, DataSource.h, + DataSource.m, Database.h, Database.m, Databases.h, Databases.m, + ExplorerModel.h, ExplorerModel.m, ExplorerNode.h, ExplorerNode.m, + Field.h, Field.m, Fields.h, Fields.m, PGCocoaDB.h, Record.h, + Record.m, RecordSet.h, RecordSet.m, Schema.h, Schema.m, Table.h, + Table.m, UnitTest/pgCocoaDBSchemaTest.m, + pgCocoaDBn.xcodeproj/ntiffin.mode1, + pgCocoaDBn.xcodeproj/ntiffin.pbxuser: Fix bug explorer not + showing and PGCocoa.h being pulled into query tool. + 2006-09-04 09:34 ntiffin |