RE: NSTextView scrolling issue.
RE: NSTextView scrolling issue.
- Subject: RE: NSTextView scrolling issue.
- From: Anthony Duer <email@hidden>
- Date: Mon, 7 Nov 2005 04:17:37 -0800
Hi List,
I did a little more digging around with my problem via NSLog'ing and
I'm definitely noticing something weird with a subclassed NSTextView
and it's enclosing NSScroller. My slightly updated method:
-(void)appendStringToView: (NSMutableAttributedString *)text
{
BOOL shouldScroll = ([scroller floatValue] == 1.00) ? YES : NO;
NSLog(@"%f", [scroller floatValue]);
[myStore beginEditing];
[myStore appendAttributedString: text];
[myStore endEditing];
NSLog(@"%f", [scroller floatValue]);
if(shouldScroll)
{
[self scrollRangeToVisible: NSMakeRange([myStore length], 0)];
[scroller setFloatValue: 1.00];
NSLog(@"%f", [scroller floatValue]);
}
NSLog(@"%f", [scroller floatValue]);
}
Here's a NSLog I received...
2005-11-07 04:10:43.284 Program[1348] 1.000000
2005-11-07 04:10:43.292 Program[1348] 1.000000
2005-11-07 04:10:43.295 Program[1348] 1.000000
2005-11-07 04:10:43.296 Program[1348] 1.000000
------------
2005-11-07 04:10:43.304 Program[1348] 0.992714
2005-11-07 04:10:43.306 Program[1348] 0.992714
2005-11-07 04:10:43.306 Program[1348] 0.992714
Somehow, between function calls, my scroller is moving up very
slightly for no reason at all. Nothing occurring at the time should
cause the scroller to move off of 1.00. Anyone ever experienced
anything like this or got a workaround?
~Anthony Duer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden