• 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: Lazy Attribute Fixing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lazy Attribute Fixing


  • Subject: Re: Lazy Attribute Fixing
  • From: Douglas Davidson <email@hidden>
  • Date: Wed, 3 Jul 2002 12:32:55 -0700

On Wednesday, July 3, 2002, at 11:58 AM, Josh Ferguson wrote:

Sorry for this seemingly simple question, but I'm confused by the term "Lazy Attribute Fixing" in relation to my NSTextStorage Concrete sub-class. What exactly does this mean? I've only found reference to it in 2 places on the Apple website and neither of them really explain what lazy attribute fixing entails. If I return YES from fixesAttributesLazily, the TextView tries to access attributes beyond the length of the string. If I return NO, it tries to feed an invalid range into fixAttributesInRange. I know there's something wrong with my implementation, but I was hoping a good description of what lazy attribute fixing is would help me track down where I'm screwing up.

If attributes are fixed lazily, then attribute fixing will generally occur only when attributes are accessed. If attributes are not fixed lazily, then attribute fixing will generally occur as changes are made.

Douglas Davidson
_______________________________________________
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.

  • Prev by Date: Re: Maintaining subview spacing when resizing
  • Next by Date: Re: NSEnumerator ordering ?
  • Previous by thread: Lazy Attribute Fixing
  • Next by thread: Subclassing a button
  • Index(es):
    • Date
    • Thread