Re: Custom attachment in a text view
Re: Custom attachment in a text view
- Subject: Re: Custom attachment in a text view
- From: David Sinclair <email@hidden>
- Date: Mon, 12 Nov 2007 21:37:12 -0800
On Nov 6, 2007, at 13:59:38, David Sinclair wrote:
Goal: drag a table row into a text view as a custom attachment.
Sounds simple, but it seems harder than it should be. It's easy
enough to create a custom attachment via a NSTextAttachmentCell
subclass, and dragging that (or programmatically inserting it) into
the text view is also easy... but that leaves two problems: dragging/
copying it gives an exception, and persisting it via Core Data makes
it vanish.
For the archives: here's a description of what I ended up with, thanks
to Douglas Davidson's comments and off-list discussion with another
developer that was working on much the same problem:
<http://www.dejal.com/blog/2007/11/cocoa-custom-attachment-text-view>
--
David Sinclair, Dejal Systems, LLC - email@hidden
Dejal blog - http://www.dejal.com/blog/
Cocoa code - http://www.dejal.com/developer/
Now on Twitter - http://twitter.com/dejal/
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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