• 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... without moving mouse? -- SOLUTION?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag and drop... without moving mouse? -- SOLUTION?


  • Subject: Re: Drag and drop... without moving mouse? -- SOLUTION?
  • From: Kevin Perry <email@hidden>
  • Date: Sat, 22 Jul 2006 13:57:13 -0700

OK, I was really confused, because I found that if I replaced my own view with an NSTextView it worked fine... what was the difference???

I'm still not exactly sure, but I found that if I call -[NSWindow nextEventMatchingMask:...] when I display the panel, my view gets draggingEntered: on mouse up. I'm guessing that's because nextEventMatchingMask:... runs the run loop, which causes the dragging IPC message to be received again.

Complicated... This should not be a problem for people creating their own NSView subclasses (especially since it seems the standard Cocoa views work correctly... why make it hard for us?)... Anyone think I should file a bug?

[kevin perry]

Hi,

In my program, I have a feature where initiating a drag and drop and holding the dragged data over a certain part of the screen brings up a panel (think spring-loaded folders in the Finder). I want a view on this panel to be the drag destination. However, because the panel ends up sliding under the mouse cursor, if I don't move the mouse before letting it go and finishing the drag, then the panel can never receive draggingEntered: and whatever was under the panel ends up receiving the drag and drop... Is there a way to make that panel receive the drag and drop in this case? (it works in the Finder...)

Thanks!

[kevin perry]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Drag and drop... without moving mouse? (From: Kevin Perry <email@hidden>)
 >Re: Drag and drop... without moving mouse? (From: Matteo Manferdini <email@hidden>)

  • Prev by Date: -stringValue on NSTextfield does not reflect actual contents
  • Next by Date: Re: Finding out if an NSArray's contents are all equal
  • Previous by thread: Re: Drag and drop... without moving mouse?
  • Next by thread: Re: Drag and drop... without moving mouse?
  • Index(es):
    • Date
    • Thread