I haven't tried, but off the top of my head it looks like a candidate for using:

[NSAttributedString enumerateAttribute:inRange:options:usingBlock:]

with NSAttachmentAttributeName as the attribute.


--Graham


On 20/09/2011, at 5:23 AM, Sandeep Mohan Bhandarkar wrote:

> Hi All,
> 
> Can anyone tell me if it is possible to get the exact range and location of 
> an attachment present in a NSTextView. Here is what i am looking for
> 
> 1) Attach images, Documents inline in a NSTextView using NSAttributedString.
> 2) Get the exact location for the Attachment in the entire text view string.
> 
> Part 1 is working for me. but I need some help on how point 2 can be done got 
> the following methods online 
> 
> [[NSTextView attributedString] containsAttachment] 
> 
> but this will only tell me if there is an attachment present. I need to know 
> where the attachment is present in the entire text of the NSTextView.

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to