Drag folder from Finder
Drag folder from Finder
- Subject: Drag folder from Finder
- From: Onar Vikingstad <email@hidden>
- Date: Thu, 4 Apr 2002 18:40:22 +0200
Hi.
I've been trying to create a feature in my app, where I can drag a
folder from the Finder over to a TextField and then have it updated with
the path to the folder dropped on it.
This is what I've been doing, but the field directoryField does not
respond when I try to drag something on it, so I don't think
draggingEntered is executed at all. Is NSFilenamesPboardType the right
PboardType to use for this? (sorry, I'm pretty new to this stuff!)
- (void)awakeFromNib {
[directoryField registerForDraggedTypes:[NSArray
arrayWithObjects:NSFilenamesPboardType,nil,nil]];
}
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender {
NSString *aFile = NSFilenamesPboardType;
[directoryField setStringValue:aFile];
}
_______________________________________________
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.