Efficient scrolling problem
Efficient scrolling problem
- Subject: Efficient scrolling problem
- From: johness does <email@hidden>
- Date: Wed, 16 Jul 2003 13:04:44 -0700 (PDT)
Alright, so I wanted to have two things scroll
together in one NSScrollView so I put two clip views
in my scroll view.
I did this by setting one through [scrollview
setDocumentView: someView]; as is normally done, and
the other I put in during the initWithFrame:, like
this:
someView= [NSView initWithFrame: someFrame];
auxClipView= [MyAuxiliaryClipView initWithFrame:
someFrame];
[auxClipView setDocumentView: someView]
[self addSubview: auxClipView]; // self==scrollview
MyAuxiliaryClipView is a subclass of NSClipView that
just unregisters itself to receive the
NSViewFrameChangeNotification and
NSViewBoundsChangeNotification since they are
unecessary.
To get them both to scroll together I subclassed
NSScrollView and overode the message
"reflectScrolledClipView:" to this:
- (void)reflectScrollClipView: (NSClipView *)aClipView
{
[super reflectScrolledClipView: aClipView];
[auxClipView scrollToPoint: whatever];
}
Everything works as it should, except my main clip
view (which is a textview by the way) no longer
efficiently scrolls. I have narrowed down the problem
to the line:
[auxClipView scrollToPoint: whatever]; //whatever is a
point that is inconsequential
If I comment that out the auxClipView does not scroll,
but the textview suddenly has efficent scrolling.
This is why I unregistered the clip view for those two
notifications originally, thinking that they were
sending some message to the scroll view, but it didnt
do the trick.
Why is this?
Any help is greatly appreciated.
Thank you in advance
Francisco Tolmasky
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
_______________________________________________
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.