Hi,
I'd like to write @"test" to the pasteboard in response to a tableview drag to
end up in another app's textfield.
I see that all my methods are called accordingly, but when I release the mouse
button, nothing is inserted nor does the cursor react by reflecting the
insertion point if the mouse button was released.
What else is needed to do this?
Also, from the documentation on pasteboardPropertyListForType one would expect to return
a property list. Property lists consist of keys and values in my understanding, but a
string is just an unordered chain of characters. What would the keyes be, actually the
one key, to which to assign the string @"test" then?
Thx
- (id<NSPasteboardWriting>)tableView:(NSTableView *)tableView
pasteboardWriterForRow:(NSInteger)row
{
return self;
}
- (NSArray *)writableTypesForPasteboard:(NSPasteboard *)pasteboard
{
return @[@"public.text"];
}
- (id)pasteboardPropertyListForType:(NSString *)type
{
NSLog(@"%@",type);
NSData *conData = [@"test" dataUsingEncoding:NSUTF8StringEncoding];
return conData;
}
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]