It's been a while since I've done any Cocoa development, and I'm trying to get this very quick and dirty (and simple) app wrapped up. I decided to use MacRuby because it was a good excuse to learn it, and the app is simple enough that it made sense.
I'm having trouble getting a custom view to respond to drag events, though.
class ImportPanel < Panel
def initWithFrame(frame)
registerForDraggedTypes(NSArray.arrayWithObjects(NSPasteboardTypeSound, nil))
super(frame)
end
def mouseDown(event)
NSLog('click')
end
def draggingEntered(sender)
NSLog('drag')
end
end
Panel, in this case, is just an NSView that adds a border. This custom view (ImportPanel) is responding correctly to click events, but not reacting at all to drag events. I have tried several different pasteboard types and configurations for registerForDraggedTypes:, but none seem to produce any results.