Re: How to Support in-line attachments in NStextView
Re: How to Support in-line attachments in NStextView
- Subject: Re: How to Support in-line attachments in NStextView
- From: Martin Hewitson <email@hidden>
- Date: Thu, 15 Sep 2011 10:22:24 +0200
Here's a subclass of NSTextView I wrote quite a while ago to handle linking files. Not sure if it all worked in the end, but it should be enough to get you started.
Martin
Attachment:
FileLinkTextView.h
Description: Binary data
Attachment:
FileLinkTextView.m
Description: Binary data
On Sep 15, 2011, at 10:15 AM, email@hidden wrote:
>
> On 15 Sep 2011, at 06:53, Sandeep Mohan Bhandarkar wrote:
>
>> Hi All,
>>
>> I have a requirement where in I need to create a NSTextView that can support in-line attachments. the feature that I am looking for can be summed up in the following points
>>
>> 1) Ability to drag and drop files images etc onto the NSTextView.
>> 2) Displaying one placeholder image for any file that is dragged and dropped (except strings)
>> 3) No text editing should be allowed in the area where the Placeholder image for attachments is present.
>>
>> I know i am asking for lot here but can some one please provide any pointers to any sample code or any resource as to how we can do this
>>
>> Thanks in Advance,
>> Sandeep.
>>
> I haven't used them but NSTextAttachment and the NSTextAttachmentCell protocol look promising.
>
> http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSTextAttachment_Class/Reference/Reference.html#//apple_ref/doc/uid/20000385
>
> Regards
>
> Jonathan Mitchell
> Mugginsoft LLP
>
> ================================================
> KosmicTask - the Integrated Scripting Environment for OS X.
> http://www.mugginsoft.com/KosmicTask
> ================================================_______________________________________________
>
> 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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer
Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: email@hidden
WWW: http://www.aei.mpg.de/~hewitson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
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