Scrolling through a big dataset
Scrolling through a big dataset
- Subject: Scrolling through a big dataset
- From: HAEUPL Friedrich - RTAA <email@hidden>
- Date: Fri, 24 Aug 2001 12:46:31 +0200
I would like to write an application that opens a datafile and displays its content graphically.
One possiblity is to create a NSView and group it into a scrollview. In the sourcecode for the
NSView the actual size NSRect theFrame = [self bounds]; has to be expanded by the
number of datapoints of the loaded file: theFrame.size.width = widthdatapoints; and then set
[self setFrame:theFrame]; Then the horizontal scroller is set so, that it reflects the relationship
between displayed width and data amount. I think that works well for smaller amounts of data.
But with growing size of data the redraw becomes too slow (All the data has to be redrawn?).
I think there has to be another approach. After loading the data the slider is set. When the
slider is moved then, only the visible part of data is fetched and displayed(redrawn). Is there
anywhere a SIMPLE example for such a behaviour? I found one source ScrollingSound.m from
a project called MusicKit / SndKit but it is rather complex....
Anbody any idea?
Fritz