Thanks, Kyle. I¹ll look into that. It¹s not clear exactly how this gets
used, especially within an attrituted string, but, hopefully, I¹ll figure it
out.
Reference docs are good to have, but they are often (and usually) deficient
in telling you how to use it. Frameworks are somewhat akin to
I¹ve successfully managed to override Paste and PerformDrag to embed images
which are resizable and with specified fractional (fraction of
height)baseline offsets. They also archive and unarchive properly. I¹m
using a custom TextAttachmentextCell which archives the size and the
fractional
When NSTextView puts rich content on a pasteboard (for copy/paste or
drag/drop), it converts the text to RTF. RTF has no concept of custom text
attachment cells, so they get dropped.
You'll need to add your own custom data type that preserves that content (such
using an archive)
On Aug 22,
I guess the operative word here is ³custom². So how does NSTextView handle
attachments which are not custom, because it does? Why not RTFD? I thought
RTF didn¹t handle attachments.
So, it looks like I need to archive the attributed string segment as a
custom pboard type, in addition to the
On Thu, Aug 22, 2013, at 04:40 PM, Gordon Apple wrote:
I guess the operative word here is ³custom². So how does NSTextView
handle
attachments which are not custom, because it does? Why not RTFD? I
thought
RTF didn¹t handle attachments.
It uses RTFD, but it might be the case that RTFD
Using NSTextView¹s native ability to embed image attachments, we have
successfully implemented resizing of the image by using a resizable frame
with a drag handle, and using setSize on the NSImage. Works great. Only
one problem, re-archiving the NSAttributableString loses the image size
change.
On Sat, Aug 10, 2013, at 10:31 AM, Gordon Apple wrote:
Using NSTextView¹s native ability to embed image attachments, we have
successfully implemented resizing of the image by using a resizable frame
with a drag handle, and using setSize on the NSImage. Works great. Only
one problem,