Skip navigation.
 
mlRe: App-specific URLs and the pasteboard. Need help.
FROM : Alastair Houghton
DATE : Fri Jan 18 18:21:32 2008

On 18 Jan 2008, at 17:05, Duncan Champney wrote:

>> Have you tried NSURLPboardType?

>
> Thanks for your reply. I forgot to include the code where i list my 
> types. I declare my types as NSURLPboardType.


That's not what the code you sent to the list says; it says 
"NSStringPboardType".

>> Or NSHTMLPboardType with HTML containing a link?

>
> That sounds like a real possibility. Do you know what you have to 
> write to the pasteboard for an NSHTMLPboardType? An NSString 
> containing the HTML?


I *think* it wants an NSData containing HTML, rather than an 
NSString.  i.e. if you had an NSString, you would need to use -
dataUsingEncoding: to create an NSData using a suitable string 
encoding (which you might consider indicating in your HTML using 
either the <?xml?> tag or a <meta> tag).

> The documentation on using the pasteboard is a little thin, truth be 
> told.


I agree that it's a little vague in places.

The most compatible option would probably be RTF, actually, but HTML 
*should* work I think.

Kind regards,

Alastair.

--
http://alastairs-place.net

Related mailsAuthorDate
mlApp-specific URLs and the pasteboard. Need help. Duncan Champney Jan 18, 16:27
mlRe: App-specific URLs and the pasteboard. Need help. Steve Bird Jan 18, 16:51
mlRe: App-specific URLs and the pasteboard. Need help. Alastair Houghton Jan 18, 17:05
mlRe: App-specific URLs and the pasteboard. Need help. Alastair Houghton Jan 18, 18:21
mlRe: App-specific URLs and the pasteboard. Need help. Alastair Houghton Jan 19, 00:30
mlRe: App-specific URLs and the pasteboard. Need help. Duncan Champney Jan 19, 13:59
mlRe: App-specific URLs and the pasteboard. Need help. Jonathon Mah Jan 20, 10:49
mlRe: App-specific URLs and the pasteboard: Clipboard Viewer tool Duncan Champney Jan 20, 15:29
mlRe: App-specific URLs and the pasteboard. Need help. Duncan Champney Jan 22, 21:44
mlRe: App-specific URLs and the pasteboard. Need help. glenn andreas Jan 22, 23:46
mlRe: App-specific URLs and the pasteboard. Need help. William Bates Jan 23, 13:22