Re: +[NSPasteboard pasteboardByFilteringData:ofType:] returns nil
Re: +[NSPasteboard pasteboardByFilteringData:ofType:] returns nil
- Subject: Re: +[NSPasteboard pasteboardByFilteringData:ofType:] returns nil
- From: Paul Lynch <email@hidden>
- Date: Wed, 5 Apr 2006 18:06:25 +0100
On 5 Apr 2006, at 16:01, Jeremy Dronfield wrote:
Does +[NSPasteboard pasteboardByFilteringData:ofType:] do anything?
If so, how? According to the documentation, it:
"Creates and returns a new pasteboard with a unique name that
supplies the specified data in as many types as possible given the
available filter services."
I've been trying to use it to create a pasteboard which splits RTF
data into all the CorePasteboardFlavorTypes. But when I do:
NSTextStorage *storage = [myTextView textStorage];
NSData *rtfData = [storage RTFFromRange:NSMakeRange(0, [storage
length]) documentAttributes:nil];
NSPasteboard *pboard = [NSPasteboard
pasteboardByFilteringData:rtfData ofType:NSRTFPboardType];
I get nil back. rtfData is not nil, so that isn't the problem. What
am I missing here?
I would imagine that you don't have any filter services installed for
rtf. Filter services are for image types.
Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden