Skip to content

Commit

Permalink
Oops, DemoAppController builds again now.
Browse files Browse the repository at this point in the history
Forgot to update DemoAppController to use the new replication API, so it broke.
Also changed the #import in the demo source files to use the framework style, so they'll still build if they're copied into another project.
  • Loading branch information
snej committed Aug 16, 2011
1 parent c4627c7 commit b5583f8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
3 changes: 2 additions & 1 deletion Demo/DemoAppController.h
Expand Up @@ -14,7 +14,7 @@
// and limitations under the License.

#import <Cocoa/Cocoa.h>
@class CouchDatabase, DemoQuery;
@class CouchDatabase, CouchReplication, DemoQuery;


/** Generic application delegate for simple Mac OS CouchDB demo apps.
Expand All @@ -28,6 +28,7 @@

CouchDatabase* _database;
DemoQuery* _query;
CouchReplication *_pull, *_push;
BOOL _glowing;
}

Expand Down
19 changes: 5 additions & 14 deletions Demo/DemoAppController.m
Expand Up @@ -16,7 +16,7 @@
#import "DemoAppController.h"
#import "DemoItem.h"
#import "DemoQuery.h"
#import "CouchCocoa.h" // in a separate project you would use <CouchCocoa/CouchCocoa.h>
#import <CouchCocoa/CouchCocoa.h>


#define kChangeGlowDuration 3.0
Expand Down Expand Up @@ -64,19 +64,10 @@ - (void) applicationDidFinishLaunching: (NSNotification*)n {


- (void) startContinuousSyncWith: (NSURL*)otherDbURL {
RESTOperation *pull = [_database pullFromDatabaseAtURL: otherDbURL
options: kCouchReplicationContinuous];
[pull onCompletion:^() {
NSLog(@"Pull ended, error=%@", pull.error);
}];
[pull start];

RESTOperation *push = [_database pushToDatabaseAtURL: otherDbURL
options: kCouchReplicationContinuous];
[push onCompletion:^() {
NSLog(@"Push ended, error=%@", pull.error);
}];
[push start];
_pull = [[_database pullFromDatabaseAtURL: otherDbURL
options: kCouchReplicationContinuous] retain];
_push = [[_database pushToDatabaseAtURL: otherDbURL
options: kCouchReplicationContinuous] retain];
}


Expand Down
2 changes: 1 addition & 1 deletion Demo/DemoItem.m
Expand Up @@ -14,7 +14,7 @@
// and limitations under the License.

#import "DemoItem.h"
#import "CouchCocoa.h" // in a separate project you would use <CouchCocoa/CouchCocoa.h>
#import <CouchCocoa/CouchCocoa.h>


@interface DemoItem ()
Expand Down
2 changes: 1 addition & 1 deletion Demo/DemoQuery.m
Expand Up @@ -16,7 +16,7 @@
#import "DemoQuery.h"
#import "DemoItem.h"

#import "CouchCocoa.h" // in a separate project you would use <CouchCocoa/CouchCocoa.h>
#import <CouchCocoa/CouchCocoa.h>


@interface DemoQuery ()
Expand Down

0 comments on commit b5583f8

Please sign in to comment.