• 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: NSTextView field editor redrawing weirdness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView field editor redrawing weirdness


  • Subject: Re: NSTextView field editor redrawing weirdness
  • From: Douglas Davidson <email@hidden>
  • Date: Mon, 16 Oct 2006 13:14:23 -0700


On Oct 16, 2006, at 1:07 PM, Nick Zitzmann wrote:

I'm using a custom field editor in a few different windows. Normally, the field editor only performs draws when the text is changed or the caret drawing timer goes off. However, in one of my views, the field editor constantly redraws the entire text view whenever the caret drawing timer goes off.

When I break on -setNeedsDisplayInRect: inside the text view, the caret timer is forcing a redisplay at the exact spot where the caret is located with a width of 1. So far, so good. The problem is, when the NSView superclass method is called, something inside the AppKit is stretching the rectangle to cover the entire view. It's only happening in one view, and I don't see anything noticeably different in that one view.

I also tried breaking on - setNeedsDisplayInRect:avoidAdditionalLayout: and confirmed that the second argument is always NO. So what in the world could be causing this behavior, and how do I stop it?

Does the field editor contain only one line of text, or more than one line? NSTextView has an optimization that will cause it to redraw only a small rect around the insertion point caret if it thinks that it can do so correctly and efficiently, but it reserves the right to redraw the entire line of text if it chooses, and it will choose to do so under some circumstances. The list of those circumstances is long and changes from release to release, but it includes criteria related to view scaling and positioning, among other things. In many circumstances there is actually little performance difference between the two cases.


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: NSTextView field editor redrawing weirdness
      • From: Nick Zitzmann <email@hidden>
References: 
 >NSTextView field editor redrawing weirdness (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: NSTextView field editor redrawing weirdness
  • Next by Date: Re: get iTunes songs
  • Previous by thread: NSTextView field editor redrawing weirdness
  • Next by thread: Re: NSTextView field editor redrawing weirdness
  • Index(es):
    • Date
    • Thread