Re: Drag and drop onto the desktop?
Re: Drag and drop onto the desktop?
- Subject: Re: Drag and drop onto the desktop?
- From: Jesse Grosjean <email@hidden>
- Date: Sun, 9 Dec 2001 22:14:50 -0500
I thought i had already asked this, but i can't seem to find it in my
sent items or in the list archives... so i'll ask again.
As i said before i'm trying to get a setup going where i drag files from
my app to the finder. As suggested I'm now creating a temp file for
dragging ahead of time and am using:
- (void)mouseDown:(NSEvent *)theEvent {
NSPoint location = [self convertPoint:[theEvent locationInWindow]
fromView:nil];
[self dragFile:tempDragFile
fromRect:NSMakeRect(location.x - 10, location.y - 10, 64, 64)
slideBack:YES
event:theEvent];
}
To start the drag operation. I'm sure that the tempDragFile has been
completely written when the drag is started. This all works fine. The
problem occurs when state changes in my app and i generate a new
tempDragFile with the same path as the last previous one. After doing
this when i try to drag to the finder i get this error when i drop onto
the finder:
"The operation cannot be completed because one or more required items
cannot be found. (Error code -43)"
But I can still drag and drop on other apps that accept files (such as
Mail) without problem. I can also navigate to where i've stored this
temp file in the finder and open or move it normally. I've been trying
to figure this out all weekend, if anyone has the key to this mystery
please pass it along, thanks,
Jesse