• 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: NSTextStorage: efficient way to find a specific attribute?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextStorage: efficient way to find a specific attribute?


  • Subject: Re: NSTextStorage: efficient way to find a specific attribute?
  • From: Just van Rossum <email@hidden>
  • Date: Mon, 12 May 2003 00:48:48 +0200

Marcel Weiher wrote:

> the NSAttributedString implementation is opaque, so we don't actually
> know what will be efficient and what not.
>
> However, -attribute:atIndex:effectiveRange: seems to be your ticket.
> Start this with index 0. It will return non-nil if the attribute
> exists at index 0, so you are done in that case.
>
> If the attribute does *not* exist at that index, effectiveRange will
> be filled with the range for which the attribute does *not* exist, so
> effeciveRange.location + effectiveRange.length should point you to
> the first character where the attribute *does* exist.
>
> I think that is what you were looking for, right?

Yes, thank you.

Just
_______________________________________________
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: NSTextStorage: efficient way to find a specific attribute? (From: Marcel Weiher <email@hidden>)

  • Prev by Date: Re: NSTextStorage: efficient way to find a specific attribute?
  • Next by Date: Re: The best way to archive dependancies
  • Previous by thread: Re: NSTextStorage: efficient way to find a specific attribute?
  • Next by thread: Best way to build relative pathname?
  • Index(es):
    • Date
    • Thread