Re: Does characterIndexForPoint ever return NSNotFound?
Re: Does characterIndexForPoint ever return NSNotFound?
- Subject: Re: Does characterIndexForPoint ever return NSNotFound?
- From: Douglas Davidson <email@hidden>
- Date: Mon, 23 Jan 2006 14:44:15 -0800
On Jan 20, 2006, at 7:42 AM, Camillo Lugaresi wrote:
According to the documentation, characterIndexForPoint returns
NSNotFound for points which are not over any character. However, in
practice it always seems to return a valid character index: for
example, for points way above the upper edge of the screen it
returns 0, and for points way below it returns the index of the
last character. Can anyone confirm this? Should I file a bug?
First, if you aren't working with input methods, I would suggest not
using characterIndexForPoint:--it's intended for input method use.
See the LayoutManagerDemo sample code on developer.apple.com for
recommended means of dealing with point-to-character conversions.
Second, in this case the header comments are more accurate.
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