Re: drag and drop images to NSWindow doesn't work
Re: drag and drop images to NSWindow doesn't work
- Subject: Re: drag and drop images to NSWindow doesn't work
- From: Charles Steinman <email@hidden>
- Date: Mon, 24 Sep 2007 11:38:50 -0700 (PDT)
--- Bill So <email@hidden> wrote:
> Dear all,
>
> I m trying the drag n drop behavior of NSWindow
> using the following excerpt:
>
> - (void)awakeFromNib {
>
> NSArray *myAy = [NSImage imagePasteboardTypes];
>
> [window registerForDraggedTypes:myAy];
>
> //[window registerForDraggedTypes:[NSArray
> arrayWithObjects:NSFilenamesPboardType,
> NSURLPboardType, nil]];
> }
> [SNIP]
> However, if I use the image pasteboard types, the
> sample app doesn't
> respond to any image dragging into the window.
>
> If I use the commented code in "awakeFromNib"
> instead, it prints those
> debug message.
It sounds like you're dragging an image file, which is
a file rather than an image, so you need that
pasteboard type to recognize the drag.
Cheers,
Chuck
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search
that gives answers, not web links.
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden