Re: How to detect NSTextAttachment deletion
Re: How to detect NSTextAttachment deletion
- Subject: Re: How to detect NSTextAttachment deletion
- From: Aki Inoue <email@hidden>
- Date: Mon, 14 Jul 2008 10:15:42 -0700
Chaitanya,
In general, whenever you want to detect user initiated editing, you
can use -textView:shouldChangeTextInRanges:replacementStrings:. In
this delegate method, look for NSTextAttachmentAttributeName in the
editing range.
Aki
On 2008/07/14, at 9:37, chaitanya pandit wrote:
Hi,
I am using a NSTextView and i programatically insert images as
NSTextAttachments in the textView. These attachments are shown in an
NSTextAttachmentCell by the NSTextView.
I want to do some background processing just before the user deletes
the image from the textView. This can happen if the user simply hits
the delete key or replaces the image with some string.
How can i detect if an NSTextAttachment or it's NSTextAttachmentCell
is about to be removed from the textView?
Any help would be appreciated.
thanks_______________________________________________
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
_______________________________________________
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