• 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: "Bill So" <email@hidden>
  • Date: Thu, 27 Sep 2007 12:22:49 +0800

Yeah, I m dragging a file from Finder to my app.  (though the file is an image)

I'll change my code to recognize that then.

Thanks,
Bill

On 9/25/07, Charles Steinman <email@hidden> wrote:
>
> --- 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

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

  • Prev by Date: Re: Textures Alpha blending problems with Transparent NSOpenGLView
  • Next by Date: Re: Convenience Methods
  • Previous by thread: Re: drag and drop images to NSWindow doesn't work
  • Next by thread: Instantiate custom NSWindow
  • Index(es):
    • Date
    • Thread