• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Custom attachment in a text view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Custom attachment in a text view (From: David Sinclair <email@hidden>)

  • Prev by Date: Re: How to archive structs like NSRect
  • Next by Date: help for NSMatrix -> action cell
  • Previous by thread: Re: Custom attachment in a text view
  • Next by thread: NSLayoutManager and avoiding widows and orphans
  • Index(es):
    • Date
    • Thread