Re: NSTextAttachment
Re: NSTextAttachment
- Subject: Re: NSTextAttachment
- From: Jens Alfke <email@hidden>
- Date: Mon, 16 Jul 2012 14:51:42 -0700
On Jul 16, 2012, at 2:15 PM, Alexander Reichstadt <email@hidden> wrote:
> Is there any way to have an NSTextView to hold text and custom data-widgets that are unrelated to filewrappers? I don't want NSTextAttachmentCell I think, because without a file it doesn't work
I have used NSTextAttachmentCell for things that are not files. Note the comment in NSTextAttachment.h that says "An NSTextAttachment *usually* has a fileWrapper" (emphasis mine). It doesn't *have* to have one.
Unfortunately it's been enough years that I don't remember the details. It may be that you can initialize an NSTextAttachment with a nil fileWrapper, or to set the fileWrapper property to nil after initialization. If not, you may just be able to pass in an arbitrary path to some file, and then the NSTextAttachmentCell methods such that they don't care what the file is.
—Jens
_______________________________________________
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