5 // Created by CiarĂ¡n Walsh on 15/08/2008.
6 // Copyright 2008 __MyCompanyName__. All rights reserved.
10 #import "PBRepositoryDocumentController.h"
12 @implementation PBCLIProxy
13 @synthesize connection;
17 if (self = [super init]) {
18 self.connection = [NSConnection new];
19 [self.connection setRootObject:self];
21 if ([self.connection registerName:ConnectionName] == NO)
28 - (BOOL)openRepository:(NSURL*)repositoryPath error:(NSError**)error;
30 // FIXME I found that creating this redundant NSURL reference was necessary to
31 // work around an apparent bug with GC and Distributed Objects
32 // I am not familiar with GC though, so perhaps I was doing something wrong.
33 NSURL* url = [NSURL fileURLWithPath:[repositoryPath path]];
34 if (id document = [[PBRepositoryDocumentController sharedDocumentController] openDocumentWithContentsOfURL:url display:YES error:nil]) {
35 [NSApp activateIgnoringOtherApps:YES];