• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Does characterIndexForPoint ever return NSNotFound?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Does characterIndexForPoint ever return NSNotFound?
      • From: Camillo Lugaresi <email@hidden>
References: 
 >Does characterIndexForPoint ever return NSNotFound? (From: Camillo Lugaresi <email@hidden>)

  • Prev by Date: Re: Can bindings be set to ignore certain values?
  • Next by Date: Re: suppressing the scod at startup
  • Previous by thread: Does characterIndexForPoint ever return NSNotFound?
  • Next by thread: Re: Does characterIndexForPoint ever return NSNotFound?
  • Index(es):
    • Date
    • Thread