I'm using the excellent NSOutlineView
subclass PXSourceList
in one of my applications. I'm trying to implement drag and drop to my PXSourceList
instance. I have:
- connected both delegate and data source outlets in IB to my controller
- in
awakeFromNib
in the controller, set self as the delegate and data source - in
awakeFromNib
in the controller, registered for dragged types - in the controller, implemented the requisite
writeItems: validateDrop: acceptDrop:
andnamesOfPromisedFilesDroppedAtDestination:
methods and declared them in the controller's .h file
For some reason, the drag and drop methods implemented in (4) are not firing at all. I've tried:
- Placing log statements in the drag and drop data source methods - they never get called.
- Putting a log statement in one of the other data source method that logs the
registeredDraggedTypes
of thePXSourceList
instance - it always returns the proper drag types assigned inawakeFromNib.
- Taking the
PXSourceList
view instance and unembedding it from all containing views except the NSWindow instance - no luck there either. - Copy-pasting data source code from my application to the sample app that comes with
PXSourceList
- it all works without modification. - Copy-pasting the working code from the example application into the SK source - it doesn't work.
So essentially I'm in a spot where all data source methods get called except the drag-and-drop methods. It's behaving like I haven't registered for dragged types, but 1) I know I have and 2) the instance responds that it is registered for the dragged types that I set.
Any ideas?