title: Scrolling in NSScrollView stops when overwriting scrollWheel function
body: <p>I experience a weird bug when I overwrite the scrollWheel(theEvent: NSEvent) function in a NSScrollView.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>import Cocoa
  
  class GraphScrollView: NSScrollView {
      var axisScrollViewInstance: AxisScrollView?
  
      override func scrollWheel(theEvent: NSEvent) {
          if theEvent.deltaY != 0 {
              axisScrollViewInstance?.scrollEventFromOtherScrollView(theEvent)
              super.scrollWheel(theEvent)
          } else if theEvent.deltaX != 0 {
              super.scrollWheel(theEvent)
          }
      }
  }
  
  class AxisScrollView: NSScrollView {
      var graphScrollViewInstance: GraphScrollView?
      override func scrollWheel(theEvent: NSEvent) {
          if theEvent.deltaY != 0 {
              super.scrollWheel(theEvent)
              graphScrollViewInstance?.scrollWheel(theEvent)
          }
      }
  
      func scrollEventFromOtherScrollView(theEvent: NSEvent) {
          if theEvent.deltaY != 0 {
              super.scrollWheel(theEvent)
          }
      }   
  }
  </code></pre>
  
  <p>The code basically checks in which direction the user is scrolling and forwards the NSEvent to another NSScrollView if the direction is vertically. I need this so that I can have two NSScrollViews next to each other, which both scroll vertically and one of them scrolls horizontally as well. As an example you can look at the Mac Calendar app, which has an hour column on the left that only scrolls vertically and a week overview on the right that scrolls horizontally and vertically. </p>
  
  <p>However, if I overwrite the scrollWheel-method and call the super function from inside, it leads to a weird problem with the Mighty Mouse. I can only scroll upwards and to the right, whereas it does nothing if I scroll in any other direction, although a NSEvent is always occurring, disregarding in which direction I scroll. After a while it stops scrolling altogether.</p>
  
  <p>I have already tried to simply overwrite the scrollWheel-method and only call the super function with the event like this:</p>
  
  <pre><code>override func scrollWheel(theEvent: NSEvent) {
      super.scrollWheel(theEvent)
  }
  </code></pre>
  
  <p>but it leads to the same problems. I have a second (non-Apple) mouse connected to my system, which has a 'normal' scroll wheel and with which my code works perfectly fine. </p>
  
  <p>Do you have an idea what the problem could be? I heard that the NSEvents are of different subtype (1: Apple Device, 0: Any other Device). Maybe that has something to do with it?
  Otherwise, do you know how I can have two NSScrollViews next to each other that scroll vertically simultaneously? </p>