concludeDragOperation, slide back, then crash
concludeDragOperation, slide back, then crash
- Subject: concludeDragOperation, slide back, then crash
- From: Gonzalo Castro <email@hidden>
- Date: Fri, 28 Sep 2001 14:30:57 -0700
Hello,
I have a custom NSImageView in which I've defined the following dragging
routines so that it accepts dragging files from the Finder (I followed
the Sketch example);
dragOperationForDraggingInfo
draggingEntered
draggingUpdated
draggingExited
prepareForDragOperation
performDragOperation
concludeDragOperation
In concludeDragOperation I receive an NSArray of the file paths which I
then pass to my window controller's setupForNewPictures() which
processes the file paths (it gets images from the files and creates an
NSMutableArray of NSImages). This can take some time. Here's the
relevant code from concludeDragOperation.
draggedFilenames = [[NSArray alloc] initWithArray:[pboard
propertyListForType:NSFilenamesPboardType]];
[myController setupForNewPictures:draggedFilenames];
The problem I'm seeing is that after I drag a lot of files (more than
15, ~400k each) into my custom NSImageView, about half way through the
files being processed in setupForNewPictures(), the dragging image
slides back to the point of origin in the Finder and soon after my app
processes the last file path it crashes. Curiously, if I obtain the
_same_ list of files using OpenPanel and then pass these to
setupForNewPictures(), no problems. Also, dragging in fewer files works
as expected with no slide back. The slideback may not be related to the
crash but it is suspicious.
Thanks for any help.