-
Notifications
You must be signed in to change notification settings - Fork 0
/
RPOutlineView.m
38 lines (29 loc) · 930 Bytes
/
RPOutlineView.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
38
//
// RPOutlineView.m
// Rampler
//
// Copyright 2010-2012 Fotonauts. All rights reserved.
//
#import "RPOutlineView.h"
@implementation RPOutlineView
- (void)copy:(id)sender
{
NSInteger selectedRow;
selectedRow = [self selectedRow];
if (selectedRow != -1) {
id item;
item = [self itemAtRow:selectedRow];
for (NSTableColumn *column in [self tableColumns]) {
if ([[column identifier] isEqualToString:self.columnIdentifierForCopy]) {
NSString *string;
NSPasteboard *pasteboard;
string = [[self dataSource] outlineView:self objectValueForTableColumn:column byItem:item];
pasteboard = [NSPasteboard generalPasteboard];
[pasteboard declareTypes:@[NSStringPboardType] owner:nil];
[pasteboard setString:string forType:NSStringPboardType];
break;
}
}
}
}
@end