How let scroll event 'sink' to parent view?

I have an uncommon scenario here.

outer tableview
+--------------------------+
| column 1| inner tableview|
+--------------------------+

Now most often the out tableview has many rows and vertical scrollbar visible.

When user try to scroll vertically in the inner tableview but it has no vertical scrollbar (because it has only a few items), I want the scroll event sink into its parent view or better outer tableview, so that user does not have to move cursor to first column in outer tableview and scrolls.

Is this possible?

I found a solution myself, after days of researching and experiments.

It's related to another question "How tell if NSTableView is already displaying its last row entirely?".

// For the inner tableview's scrollview
class MyScrollView: NSScrollView {
    var onScrollWheel: EventHandler!

    override func scrollWheel(with event: NSEvent) {
        super.scrollWheel(with: event)
        // In onScrollWheel, determine if vertical scrollbar is hidden or at top/bottom,
        // then delegate this event to the outer tableview:
        // outerTableView.scrollWheel(with: event)
        onScrollWheel?(event)
    }
}
How let scroll event 'sink' to parent view?
 
 
Q