FROM : Douglas Davidson
DATE : Thu Jan 24 03:00:04 2008
On Jan 23, 2008, at 7:33 AM, Kai Brüning wrote:
> NSTextView seems to have broad support for copying text attachments
> to pasteboards in whatever custom format is desired:
> - textView:writablePasteboardTypesForCell:atIndex: delegate method
> - textView:writeCell:atIndex:toPasteboard:type: delegate method
>
> But I can't find similar support for reading from a pasteboard. From
> what I have seen, the only method seems to be to put an attributed
> string with the text attachment(s) in it on the pastboard. While
> this is possible, I would rather like to convert some custom format
> into a text attachment the moment it is read from the pasteboard.
You would do this with the standard mechanisms for extending
NSTextView pasteboard reading--see the header file comments on
"Pasteboard support", notably for -readablePasteboardTypes and -
readSelectionFromPasteboard:type:.
Douglas Davidson
DATE : Thu Jan 24 03:00:04 2008
On Jan 23, 2008, at 7:33 AM, Kai Brüning wrote:
> NSTextView seems to have broad support for copying text attachments
> to pasteboards in whatever custom format is desired:
> - textView:writablePasteboardTypesForCell:atIndex: delegate method
> - textView:writeCell:atIndex:toPasteboard:type: delegate method
>
> But I can't find similar support for reading from a pasteboard. From
> what I have seen, the only method seems to be to put an attributed
> string with the text attachment(s) in it on the pastboard. While
> this is possible, I would rather like to convert some custom format
> into a text attachment the moment it is read from the pasteboard.
You would do this with the standard mechanisms for extending
NSTextView pasteboard reading--see the header file comments on
"Pasteboard support", notably for -readablePasteboardTypes and -
readSelectionFromPasteboard:type:.
Douglas Davidson
| Related mails | Author | Date |
|---|---|---|
| Kai Brüning | Jan 23, 16:33 | |
| Douglas Davidson | Jan 24, 03:00 |






Cocoa mail archive

