Files
gitx/PBCommandMenuItem.m
T
2010-11-06 13:20:13 +01:00

37 lines
612 B
Objective-C

//
// PBCommandMenuItem.m
// GitX
//
// Created by Tomasz Krasnyk on 10-11-06.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import "PBCommandMenuItem.h"
@interface PBCommandMenuItem()
@property (nonatomic, retain) PBCommand *command;
@end
@implementation PBCommandMenuItem
@synthesize command;
- initWithCommand:(PBCommand *) aCommand {
if (self = [super init]) {
self.command = aCommand;
super.title = [aCommand displayName];
[self setTarget:aCommand];
[self setAction:@selector(invoke)];
}
return self;
}
- (void) dealloc {
[command release];
[super dealloc];
}
@end