Re: Text extracts, .webloc & NSTextView
Re: Text extracts, .webloc & NSTextView
- Subject: Re: Text extracts, .webloc & NSTextView
- From: Ryan Stevens <email@hidden>
- Date: Mon, 27 May 2002 09:10:38 -0700
On Sunday, May 26, 2002, at 12:42 PM, Bruno Blondeau wrote:
My users often create text extracts and .webloc files on their desktop.
However, when these files are drag&dropped in the NSTextView of my
application, they only appear as icons.
It would be much better if the real content of these files was accepted.
Is it possible to do this?
My guess is that you'd want to subclass NSTextView and override
-draggingEnded: (see NSDraggingDestination).
You should be able to find the path to the file in the associated
NSDraggingInfo. From there it should just be a matter of reading the
file and doing something with it.
That's my best guess anyway. If you do figure it out maybe you could
post back. It seems like there should be a note in the docs that tells
you what you can do to accept file drops. Maybe in the Tasks-n-Concepts?
HTH
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.