In your code snippet you're getting the NSPasteboard
instance but not copying your data to it. That's required, otherwise your drag won't be initiated properly - that's probably why you'll never get the mouseUp:
event.
The docs for dragImage:at:offset:event:pasteboard:source:slideBack:
state that
Before invoking this method, you must place the data to be transferred on pboard. To do this, get the drag pasteboard object (NSDragPboard), declare the types of the data, and then put the data on the pasteboard.