Re: Text extracts, .webloc & NSTextView
Re: Text extracts, .webloc & NSTextView
- Subject: Re: Text extracts, .webloc & NSTextView
- From: Bruno Blondeau <email@hidden>
- Date: Mon, 27 May 2002 21:10:53 +0200
on 27/05/02 18:10, Ryan Stevens - email@hidden wrote:
>
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?
Supposing I do this, how would I open the text extracts?
I've not checked, but I wouldn't be surprised if it is proprietary (and
would require Carbon calls to retrieve the styled data of the text extract,
which may also include quickdraw pictures ('pict') and so on)
Also, unless this has changed recently, this is working for free in Carbon.
Since Apple's goal is to be sure there isn't any way to recognize a Carbon
app from a Cocoa one, I guess it should be up to them to this fix...
Bruno
_______________________________________________
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.