RE: NSTextView custom cursor

  • I'm replying to an old post for the sake of the list archives:

    > Although I have never tried it myself, I believe the method you
    > would need to override is NSTextView's:
    >
    > -drawInsertionPointInRect:color:turnedOn:
    > ...
    >
    > However, it only had any effect while the cursor was still and
    > blinking - during typing, the insertion point was still a thin
    > line, so I'm guessing that it must also be drawn elsewhere.

    I needed to do the same and also found that overriding that one
    method was insufficient. It turns out you've also got to override the
    private method:

    - (void) _drawInsertionPointInRect:(NSRect)rect color:(NSColor*)color

    It's frustrating that a public override point is declared and then
    simply not used half the time. I'll file a radar.

    ~Martin
previous month december 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
31            
Go to today