NSToolTipAttribute not written to pasteboard?
NSToolTipAttribute not written to pasteboard?
- Subject: NSToolTipAttribute not written to pasteboard?
- From: Philip Dow <email@hidden>
- Date: Thu, 24 Jul 2008 15:28:51 -0700
Howdie,
I'm playing around with the NSToolTipAttribute in attributed strings
and I seem to be finding that the attribute is not written to the
pasteboard when I cut/paste or drag text around in an NSTextView. Is
this a known issue?
Checking Google I discovered that back in 2004 it was reported that
tool tip attributes are not saved to disk when the attributed string
is written out as rich text. I haven't checked whether this is still
the case, but it seems like a related issue.
(Eventually, I will want to save the tool tip attribute, but I think I
can figure this out archiving the attributed string instead of writing
rtf.)
If it is the case that tool tips aren't written to the pasteboard
along with the rtf that normally is, could someone confirm this? I'm
also exploring a workaround and was wondering if someone could chime
in. Could I override writablePasteboardTypes and associated methods to
add the tooltip attribute to the pasteboard myself? I'd then have to
read it back in when the drag or paste is complete, something I'm
willing to work on if this is the most straightforward approach.
Some context: I'm trying to store notes (eg endnotes, footnotes,
margin notes) in an attributed string. The tooltip seems ideally
suited to the purpose but I'm running into these limitations. I've
also considered using a special url and the NSLinkAttribute. Might
there be a better way to embed notations into an attributed string?
~Phil
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden