-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPDButton.m
37 lines (26 loc) · 824 Bytes
/
PDButton.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// PDButton.m
// SproutedInterface
//
// Created by Philip Dow on 12/4/05.
// Copyright Sprouted. All rights reserved.
// Inquiries should be directed to [email protected]
//
#import <SproutedInterface/PDButton.h>
#import <SproutedInterface/PDButtonCell.h>
@implementation PDButton
- (id)initWithCoder:(NSCoder *)decoder {
if ( self = [super initWithCoder:decoder] ) {
NSArchiver * anArchiver = [[[NSArchiver alloc]
initForWritingWithMutableData:[NSMutableData dataWithCapacity: 256]] autorelease];
[anArchiver encodeClassName:@"NSButtonCell" intoClassName:@"PDButtonCell"];
[anArchiver encodeRootObject:[self cell]];
[self setCell:[NSUnarchiver unarchiveObjectWithData:[anArchiver archiverData]]];
}
return self;
}
+ (Class) cellClass
{
return [PDButtonCell class];
}
@end