Re: NSImageView as a drag source - how?
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:09:55 -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.