Stuck on programmatic scrolling (scrollToBottom sample code)
Stuck on programmatic scrolling (scrollToBottom sample code)
- Subject: Stuck on programmatic scrolling (scrollToBottom sample code)
- From: Christopher Corbell <email@hidden>
- Date: Sat, 7 Aug 2010 01:37:16 -0700
I have a WebKit view which is displaying HTML content from a string.
Periodically content can get inserted to the end of the body of the html
document, at which time I have the WebView reload.
I simply want to make the application programmatically scroll to the bottom
of the page when this happens, like a chat view or scrolling terminal
output.
After I tell the WebView to load its new content I call a scrollToBottom
method identical to the one documented here:
http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/NSScrollViewGuide/Articles/Scrolling.html#//apple_ref/doc/uid/TP40003463-SW1
)
It never works - the view just always reload the content scrolled up to the
beginning. FWIW I also tried this with an NSTableView and couldn't get it
to work there either. The sample code includes special logic if the view
coordinates are flipped so I know it isn't that.
Anyone have a guess as to the issue?
TIA,
Chris
_______________________________________________
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