• 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: Keith Blount <email@hidden>
  • Date: Thu, 17 Feb 2005 15:13:01 -0800 (PST)
  • Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys

Many thanks for your swift and helpful reply (again).

I have implemented your method in my NSTextView
subclass instead of the -inLiveResize override that I
was using (which probably resulted in posting two
notifications when under 10,000 characters now that I
think about it).

It's good to know that I was on the right track and
that this is the correct way to fix my problem - it
has held me up for weeks.

Many thanks again,
Keith

--- Douglas Davidson <email@hidden> wrote:

> 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 you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250
 _______________________________________________
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

References: 
 >Re: Live resize bug in NSTextView? (quick follow up) (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: Live resize bug in NSTextView? (quick follow up)
  • Next by Date: Re: login item for all users
  • Previous by thread: Re: Live resize bug in NSTextView? (quick follow up)
  • Next by thread: cell respond to key events
  • Index(es):
    • Date
    • Thread