• 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: Using -scrollRectToVisible: in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using -scrollRectToVisible: in NSTextView


  • Subject: Re: Using -scrollRectToVisible: in NSTextView
  • From: J Nozzi <email@hidden>
  • Date: Tue, 6 Jul 2004 12:28:53 -0400

I agree ... this is what I do. Look at NSRangeFromString() and NSStringFromRange() for storing in preferences or an easy way of storing in meta data ... the neat thing here is that by storing the selected range, you can not only 'remember' the position, but the selection as well.

- J


On Jul 6, 2004, at 12:19 PM, Douglas Davidson wrote:

On Jul 6, 2004, at 8:12 AM, Jeremy Dronfield wrote:

Are there any known issues with sending -scrollRectToVisible to NSTextView (or subclasses)?

I'm trying to get my text view to remember the visible rect for the last text file viewed, so that it can scroll back to that place when the same file is next loaded. I'm doing this:

I think you would probably be better off using scrollRangeToVisible: instead; otherwise you might need to manually force layout before scrolling.

Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Using -scrollRectToVisible: in NSTextView (From: Jeremy Dronfield <email@hidden>)
 >Re: Using -scrollRectToVisible: in NSTextView (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: Using -scrollRectToVisible: in NSTextView
  • Next by Date: WebKit and saving position through a reload
  • Previous by thread: Re: Using -scrollRectToVisible: in NSTextView
  • Next by thread: Re: Using -scrollRectToVisible: in NSTextView
  • Index(es):
    • Date
    • Thread