Cocoa/Obj-C - TextField to clipboard button
- (IBAction)copyButton:(id)sender {
NSPasteboard *pasteBoard = [NSPasteboard generalPasteboard];
[pasteBoard declareTypes:[NSArray arrayWithObjects:NSStringPboardType, nil] owner:nil];
[pasteBoard setString: [textField stringValue] forType:NSStringPboardType];
}