Hi,
I've got an NSTextView, inside an NSScrollView, and I want to scroll it to exactly where it used to be after repopulated the NSTextView with new data. So far, I've tried variations on the code below, but it never gets it quite right.
What I need is a setDocumentVisibleRect method, but there isn't one.
NSRect oldVisibleRect = [[[self scrollView] contentView] documentVisibleRect];
[Code to repopulate data]
[[[self scrollView] contentView] scrollToPoint:newPoint];
Any ideas?