• 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
Scrolling Behavior of NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scrolling Behavior of NSTextView


  • Subject: Scrolling Behavior of NSTextView
  • From: Dong Feng <email@hidden>
  • Date: Mon, 7 Jun 2010 23:44:23 +0800

I encountered a wired behavior of NSTextView. I tried to use the following
statement to scroll to top:

[[_scrollView documentView] scrollPoint:NSMakePoint(0, 0)];

where the *documentView* is a NSTextView. But it seems when the window is in
certain size, the scroll-to-top behavior does not take effect. Then I added
a seemingly irrelevant statement before the above statement, by accidental,
so the fragment become the follows:

[[[_scrollView documentView] layoutManager]
glyphRangeForTextContainer:[[self dictionaryContent] textContainer]];
[[_scrollView documentView] scrollPoint:NSMakePoint(0, 0)];

The complete source code is at http://techsingular.net/dict_mac/dict_mac.dmg

The problem happens when you search for "灵" or "神" through this dictionary
program.

Dong
_______________________________________________

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: Scrolling Behavior of NSTextView
      • From: Martin Wierschin <email@hidden>
    • Re: Scrolling Behavior of NSTextView
      • From: "Paul Sanders" <email@hidden>
  • Prev by Date: Re: Creating Photoshop plugins
  • Next by Date: Re: SQLite Database 2 distinct database iphone.
  • Previous by thread: Re: Creating Photoshop plugins
  • Next by thread: Re: Scrolling Behavior of NSTextView
  • Index(es):
    • Date
    • Thread