Re: Link & Table Cursors in NSTextView
Re: Link & Table Cursors in NSTextView
- Subject: Re: Link & Table Cursors in NSTextView
- From: Douglas Davidson <email@hidden>
- Date: Mon, 27 Feb 2006 13:26:39 -0800
On Feb 24, 2006, at 2:48 PM, Glen Simmons wrote:
I'm using code from the TextLinks sample (http://
developer.apple.com/samplecode/TextLinks/TextLinks.html) to get a
pointing hand cursor over links in my NSTextView subclass. But this
has broken the resize cursors that appear over the edges of tables.
I've tried calling [super resetCursorRects] at the beginning and at
the end of my subclass' -resetCursorRects method and either will
restore the table cursor behavior, but breaks the link cursors. Any
ideas? Do I now have to write code to handle cursors for tables
myself?
None of this should be necessary--links get the pointing hand cursor
by default, based on the text view's linkTextAttributes. If you need
custom cursors, you can use NSCursorAttributeName. If you really
need to override the default cursor handling in some way that this
doesn't support, don't use cursor rects; instead, override
mouseMoved:, call the super method, and then afterward set the cursor
if the mouse is over some region you are particularly interested in,
otherwise leave it alone.
Douglas Davidson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden