• 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: -draggingEntered: never gets called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -draggingEntered: never gets called


  • Subject: Re: -draggingEntered: never gets called
  • From: Michael Gardner <email@hidden>
  • Date: Mon, 5 May 2008 16:42:00 -0500

The source implements -draggingSourceOperationMaskForLocal: and - mouseDown: (for initiating the drag).

The destination implements -draggingEntered:, - prepareForDragOperation:, and -performDragOperation:.

I checked the pasteboard's types list, and the result is as expected. For reference, here's how I start the drag:

NSPasteboard * pboard = [NSPasteboard pasteboardWithName: NSDragPboard];
[pboard declareTypes: [NSArray arrayWithObject: MyPasteboardType] owner: nil];
if ([pboard setData: dragData forType: MyPasteboardType])
[self dragImage: dragImage at: dragLoc offset: NSZeroSize event: event pasteboard: pboard source: self slideBack: YES];


-Michael

On May 5, 2008, at 4:25 PM, Stéphane Sudre wrote:


On May 5, 2008, at 11:02 PM, Michael Gardner wrote:
I'm trying to implement drag & drop in an NSView subclass. I made sure that the source returns NSDragOperationMove in - draggingSourceOperationMaskForLocal:, and that the destination calls -registerForDraggedTypes: with the same (custom) type that the source uses for the drag operation.

The drag operation starts properly, but the destination's - draggingEntered: method never gets called, no matter what I do. What could cause this? Does it matter if the source and destination are the same object?

What methods did you implement in your view for drag& drop?

Did you log the content of the pasteboard after the drag is initiated?



_______________________________________________

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

_______________________________________________

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: 
 >-draggingEntered: never gets called (From: Michael Gardner <email@hidden>)
 >Re: -draggingEntered: never gets called (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: What do these errors mean?
  • Next by Date: Re: NSXMLDocument encoding
  • Previous by thread: Re: -draggingEntered: never gets called
  • Next by thread: Re: -draggingEntered: never gets called [solved?]
  • Index(es):
    • Date
    • Thread