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
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 mails | Author | Date |
|---|---|---|
| Duncan Champney | Jan 18, 16:27 | |
| Steve Bird | Jan 18, 16:51 | |
| Alastair Houghton | Jan 18, 17:05 | |
| Alastair Houghton | Jan 18, 18:21 | |
| Alastair Houghton | Jan 19, 00:30 | |
| Duncan Champney | Jan 19, 13:59 | |
| Jonathon Mah | Jan 20, 10:49 | |
| Duncan Champney | Jan 20, 15:29 | |
| Duncan Champney | Jan 22, 21:44 | |
| glenn andreas | Jan 22, 23:46 | |
| William Bates | Jan 23, 13:22 |






Cocoa mail archive

