• 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: NSImageView as a drag source - how?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImageView as a drag source - how?


  • Subject: Re: NSImageView as a drag source - how?
  • From: Jeff LaMarche <email@hidden>
  • Date: Thu, 6 Jun 2002 13:10:29 -0700 (PDT)

On Thursday, June 06, 2002, at 08:03PM, Chris DeSalvo <email@hidden> wrote:
>I've created a subclass of NSImageView and added the following selectors:
>
>- (BOOL) acceptsFirstMouse:(NSEvent *)theEvent;
>- (NSDragOperation) draggingSourceOperationMaskForLocal:(BOOL)flag;
>- (void) mouseDragged:(NSEvent *)theEvent;
>
>But my class still won't act as a drag source. The above selectors never
>even get called when I click and drag in that view.
>
>What am I doing wrong?

I hit exactly the same predicament a few weeks. I don't know why, but starting your drag from mouseDragged: doesn't work when subclassing NSImageView. If you start your drag from mouseDown, I bet it will start to work.

They used to document that you should start from mouseDown:, now they say either mouseDown: or mouseDragged: works, but mouseDown seems to be more dependable...
_______________________________________________
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.

  • Prev by Date: Re: NSImageView as a drag source - how?
  • Next by Date: Re: (no subject)
  • Previous by thread: Re: NSImageView as a drag source - how?
  • Next by thread: Re: NSImageView as a drag source - how?
  • Index(es):
    • Date
    • Thread