mouseDragged not working in NSSplitView subview

  • I have an NSView subclass that implements mouseDragged: to initiate a
    promised file drag, and it works quite well as a standalone view.  If
    I make it a subview of an NSSplitView, my mouseDragged: method is no
    longer called, though.

    I used poseAsClass: to override NSSplitView's mouseDown: and only call
    super's implementation when it actually gets a click on a divider
    rect, and that works (my mouseDragged: method is called).  Obviously
    subclassing would be preferable to posing.

    I could run a while(1) loop in mouseDown: and get events myself, but
    that solution isn't as aesthetically pleasing to me and it seems to
    screw up event handling in cases like mine.  Is that really the right
    thing to do?  Sketch does it, and apparently NSSplitView as well (and
    Apple's DraggableScrollView example, IIRC).

    thanks,
    Adam
previous month september 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today