• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: drag and drop images to NSWindow doesn't work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: drag and drop images to NSWindow doesn't work
      • From: "Bill So" <email@hidden>
References: 
 >drag and drop images to NSWindow doesn't work (From: "Bill So" <email@hidden>)

  • Prev by Date: best way to deal with resizable controls that can go to zero?
  • Next by Date: Re: Instantiate custom NSWindow
  • Previous by thread: Re: drag and drop images to NSWindow doesn't work
  • Next by thread: Re: drag and drop images to NSWindow doesn't work
  • Index(es):
    • Date
    • Thread