Re: Newbie ImageWell question
Re: Newbie ImageWell question
- Subject: Re: Newbie ImageWell question
- From: Matt Neuburg <email@hidden>
- Date: Thu, 10 Oct 2002 09:41:58 -0700
On Mon, 7 Oct 2002 14:02:54 -0700, Nicholas Francis
<email@hidden> said:
>
Hi guys. I've fretted over the docs for hours trying to figure out how
>
to get the filename (not the image data) of a file dropped over an
>
NSImageWell
Here's how I do it. These are excerpts only, to show you the idea. This is
a subclass of NSImageView.
- (unsigned int)draggingEntered:(id <NSDraggingInfo>)sender {
...
dragPasteboard = [sender draggingPasteboard];
types = [dragPasteboard types];
if ([types indexOfObject:NSFilenamesPboardType] != NSNotFound) {
if ([sender draggingSourceOperationMask] & NSDragOperationGeneric) {
tempArray = [[sender draggingPasteboard] propertyListForType:
NSFilenamesPboardType];
// do tests as desired, return the right thing
...
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender {
...
tempArray = [[sender draggingPasteboard] propertyListForType:
NSFilenamesPboardType];
s = [tempArray objectAtIndex:0];
[self setItsFolderPath: s];
...
m.
--
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
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.