views:

277

answers:

0

In an attempt to create drag and drop between two NSCollectionViews in the same app i've made the view that holds the collection views responsible for all the mouse clicks. It then checks what the mouse actually hits, etc. One problem I'm having though, is trying to get the NSCollectionView to handle single clicks properly (i.e. if the start and end points of the click are the same). Sending mouseDown to the event just starts it off on it's little loop that it uses by default to handle clicks, and I'm not sure how to tell it that a mouseUp has occurred as well. I tried creating a new event with type NSLeftMouseUp and sending that to the collection view, but to no avail.

I've seen someone else approach this by overriding mouseDown for the collection view item view, but I'm not sure if this complicates anything. I'd much rather be able to tell it to do what it usually does. Anyone managed this themselves or know of a good way to do it?

related questions