Skip to content

Commit

Permalink
If a database doesn't have collection, need to create a test collecti…
Browse files Browse the repository at this point in the history
…on in order to click to create new collections.
  • Loading branch information
bububa committed Jun 14, 2011
1 parent 1f1c33d commit a82839b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ConnectionWindowController.mm
Expand Up @@ -268,6 +268,9 @@ - (void)useDB:(id)sender {
[collections release]; [collections release];
[loaderIndicator start]; [loaderIndicator start];
collections = [[NSMutableArray alloc] initWithArray:[mongoDB listCollections:dbname user:user password:password]]; collections = [[NSMutableArray alloc] initWithArray:[mongoDB listCollections:dbname user:user password:password]];
if ([collections count] == 0) {
[collections addObject:@"test"];
}
[loaderIndicator stop]; [loaderIndicator stop];
[dbname release]; [dbname release];


Expand Down

0 comments on commit a82839b

Please sign in to comment.