06-19-2008, 10:49 AM
The situation is like this:
I have a subclass of NSView, which in enclosed by NSScrollView.
I don't know if I have done it right:
in init function I have:
if ((self = [super initWithFrame:frameRect]) != nil)
[[self enclosingScrollView] setDocumentView: self];
So ... when I open the window, where this nsview is drawn, the scrolling won't work till I click on the knob of the scroller (only vertical scroller). The same is when I make:
[[[self enclosingScrollView] verticalScroller] setFloatValue:value];
After that when I roll the scroller of the mouse - the NSScrollView scrolls from the last "scrolled" place.
I read that the method trackKnob "tells" the scroller that the knob has been clicked, and I tried to use it but as it seems, I can't create appropriate Event to send to it.
Anyone can help me? Pleeeease