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, jonat...@mugginsoft.com 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 (Cocoa-dev@lists.apple.com)
> 
> 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/martin.hewitson%40aei.mpg.de
> 
> This email sent to martin.hewit...@aei.mpg.de

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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: martin.hewit...@aei.mpg.de
WWW: http://www.aei.mpg.de/~hewitson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to