• 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: Live resize bug in NSTextView? (quick follow up)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Live resize bug in NSTextView? (quick follow up)


  • Subject: Re: Live resize bug in NSTextView? (quick follow up)
  • From: Douglas Davidson <email@hidden>
  • Date: Thu, 17 Feb 2005 14:50:36 -0800

On 2005-02-17 14:35:50 -0800 Keith Blount <email@hidden> wrote:

Just a quick follow up - after testing, it seems that
live resize stops posting
NSViewFrameDidChangeNotification in NSTextView once
there are 10,000 characters or more in the text view
and the scrollview is not at the top of the view. My
guess is therefore that this is not a bug but intended
as an optimisation, so that live resize doesn't slow
things down too much... But if so, there must be a
method in NSText, NSTextView, NSTextStorage or
NSTextContainer somewhere that can alter this figure,
though I can't find it. Am I missing something
obvious?

To alter this behavior, implement something like the following on your NSTextView subclass:


- (void)viewWillStartLiveResize {
BOOL wasPosting = [self postsFrameChangedNotifications];
[super viewWillStartLiveResize];
if (wasPosting && <insert logic of your own here to determine whether you want live relayout>) {
[self setPostsFrameChangedNotifications:YES];
}
}


Alternatively, you can use viewWillStartLiveResize, viewDidEndLiveResize, and inLiveResize to delay the relayout of your additional objects until live resize has finished.

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: Live resize bug in NSTextView? (quick follow up)
      • From: Keith Blount <email@hidden>
References: 
 >Re: Live resize bug in NSTextView? (quick follow up) (From: Keith Blount <email@hidden>)

  • Prev by Date: Re: Live resize bug in NSTextView? (quick follow up)
  • Next by Date: Re: Live resize bug in NSTextView? (quick follow up)
  • Previous by thread: Re: Live resize bug in NSTextView? (quick follow up)
  • Next by thread: Re: Live resize bug in NSTextView? (quick follow up)
  • Index(es):
    • Date
    • Thread