Re: dragging from a view to editors and the finder
Re: dragging from a view to editors and the finder
- Subject: Re: dragging from a view to editors and the finder
- From: Nick Zitzmann <email@hidden>
- Date: Mon, 18 Apr 2005 07:28:16 -0600
On Apr 18, 2005, at 5:00 AM, Nestor Cardozo wrote:
Currently I can drag the contents of the view and drop it to
applications such as textedit, easycrop, illustrator (but strangely
not keynote). My problem is that I cannot drag from my view to the
finder. I understand I should implement
- (BOOL)dragPromisedFilesOfTypes:(NSArray *)typeArray
fromRect:(NSRect)aRect source:(id)sourceObject
slideBack:(BOOL)slideBack event:(NSEvent *)theEvent
and
- (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL
*)dropDestination
But, if I understand well these methods assume that you already have a
file. Should I create a file within my mouseDragged method?
No. If you start a file-promise drag, you are promising the receiver
that the application will place a file at a specific path, but that
path doesn't need to exist at drag-time. That's why it's called a "file
promise", because your application promises to place a file in that
location.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden