• 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
NSTextView scrolls to top when text storage changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView scrolls to top when text storage changes


  • Subject: NSTextView scrolls to top when text storage changes
  • From: Martin Hewitson <email@hidden>
  • Date: Sat, 07 Jul 2012 06:47:05 +0200

Dear List,

I have a document managing app which has a project search feature for searching through the project's managed files (see thread "Dynamic modification of text search results" earlier this week).

When I find search matches I add an attribute to the textstorage in which the search term was found. For the file/textstorage that is currently displayed in the editor (the NSTextView), this has the consequence of scrolling the text view to the top. The selection is not changed - just the scrollview jumps to the top.

I assume this must be a bug. I've checked every place in the code where I respond to NSTextStorageDidProcessEditingNotification, and none of these is responsible for the scrolling.

Has anyone else seen this behaviour? Is this a known issue? If so, is there a workaround?

Many thanks,

Martin



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSTextView scrolls to top when text storage changes
      • From: Martin Hewitson <email@hidden>
  • Prev by Date: Re: Getting NSApplicationDelegate protocol
  • Next by Date: Re: NSTextView scrolls to top when text storage changes
  • Previous by thread: Re: rotating NSBezierPath objects
  • Next by thread: Re: NSTextView scrolls to top when text storage changes
  • Index(es):
    • Date
    • Thread