Receiving mouseDown event in NSTextView subclass outside of the text container

  • In my subclass of NSTextView I have overridden mouseDown. The text
    container associated with the text view doesn't fill the whole text
    view. My mouseDown method gets only called when I click in the area of
    the text container. If I hit the area outside of the text container
    but still in the text view my mouseDown method doesn't get invoked.

    Is there a way to receive mouseDown events outside the text container?
    Actually I want handle the events outside the container myself and
    call super for handling the events occuring in the container.

    Cheers,
    Martin
  • Martin,

    If memory serves, I once encountered a similar problem where I
    subclassed the NSTextView's enclosing NSScrollView too.

    -Jeff

    On Nov 6, 2007, at 11:48 AM, Martin Ott wrote:

    > In my subclass of NSTextView I have overridden mouseDown. The text
    > container associated with the text view doesn't fill the whole text
    > view. My mouseDown method gets only called when I click in the area
    > of the text container. If I hit the area outside of the text
    > container but still in the text view my mouseDown method doesn't
    > get invoked.
    >
    > Is there a way to receive mouseDown events outside the text
    > container? Actually I want handle the events outside the container
    > myself and call super for handling the events occuring in the
    > container.
    >
    > Cheers,
    > Martin
previous month november 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