// // P4Response.m // MBMenuExtra // // Created by Michael Bishop on 1/7/10. // Copyright 2010 Perforce Software. All rights reserved. // #import "P4Response.h" #import "P4Response_p.h" @implementation P4Response @synthesize error = _error, results = _results; +(id)responseWithError:(NSError*)error results:(NSArray *)results { return [[[P4Response alloc] initWithError:error results:results] autorelease]; } -(id)initWithError:(NSError*)error results:(NSArray *)results { if ( (self = [super init]) == nil ) return nil; _error = [error retain]; _results = [results copy]; return self; } -(void)dealloc { [_error release]; [_results release]; [super dealloc]; } -(NSString*)description { return [NSString stringWithFormat:@"results:%@ error:%@", self.results, self.error]; } -(BOOL)isSuccess { return _error == nil; } -(NSDictionary*)result { if ( ![_results count] ) return nil; return [_results objectAtIndex:0]; } @end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 8331 | Matt Attaway |
Adding initial version of MacMenu for Perforce MacMenu is a helpful Perforce client that sits in your toolbar. It allows you to run standard Perforce operations on the document that is open the currently active editor/viewer. |