• 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: attributesAtIndex:effectiveRange: vs the insertion point at end of text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: attributesAtIndex:effectiveRange: vs the insertion point at end of text


  • Subject: Re: attributesAtIndex:effectiveRange: vs the insertion point at end of text
  • From: Jérôme Laurens <email@hidden>
  • Date: Wed, 18 Sep 2002 13:45:38 +0200

Le mercredi, 18 sep 2002, ` 10:20 Europe/Zurich, Dave Fayram a icrit :

I ran into the same problem, several methods in NSTextView seem to break in this case.
What I did was detect if my selection began at the end of the text, and if so decremented the insertion
point by 1. Usually this gets the behavior I'd more-or-less expect from it.

I dunno why it breaks on that perfectly reasonable case, either. It's really quite strange.



all these methods are documented to raise an exception if some part of the range is outside the string.

methods for asking attributes are saying "what are the attributes of the character at index: location", so it is natural to expect a character at that location.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: attributesAtIndex:effectiveRange: vs the insertion point at end of text (From: Dave Fayram <email@hidden>)

  • Prev by Date: NSDisclosureButtonCell
  • Next by Date: Adding NSButton(s) to NSScrollView programmatically
  • Previous by thread: Re: attributesAtIndex:effectiveRange: vs the insertion point at end of text
  • Next by thread: Re: attributesAtIndex:effectiveRange: vs the insertion point at end of text
  • Index(es):
    • Date
    • Thread