FROM : Florian Soenens
DATE : Mon Jan 27 07:27:08 2003
Hello,
i posted this question a couple of days ago and got no response so far,
thus i will try again...
i have the following problem:
I subclassed NSMatrix to do my own mouse event handling. The NSMatrix
is part of a scroll view.
The matrix also has an NSMutableArray that contains images. (1000 or
more) Depending on the count of images, the Matrix rebuilds itself.
This goes all well. Then, i fill all the cells of the matrix with the
images of the array like this:
for(i = 0; i < [theArray count]; i++)
{
[[theMatrix cellAtRow:r column:c] setImage: [theArray objectAtIndex:i];
}
Here comes the problem. (I'm actually not sure if it is a problem at
all, but it's frustrating nonetheless)
When all the images are set, and i scroll the matrix, the scrolling is
slow. (Dual G4 1GHZ) When i compare this to the scrolling speed of
iPhoto for example, it's 10x slower.
When i scrolled to the bottom completely, and then try again, the
scrolling goes a lot faster, cause the images have been displayed
already.
The question is: is there a way to let it scroll faster from the
beginning? Does it have something to do with caching?
Thanks in advance,
Florian Soenens.
DATE : Mon Jan 27 07:27:08 2003
Hello,
i posted this question a couple of days ago and got no response so far,
thus i will try again...
i have the following problem:
I subclassed NSMatrix to do my own mouse event handling. The NSMatrix
is part of a scroll view.
The matrix also has an NSMutableArray that contains images. (1000 or
more) Depending on the count of images, the Matrix rebuilds itself.
This goes all well. Then, i fill all the cells of the matrix with the
images of the array like this:
for(i = 0; i < [theArray count]; i++)
{
[[theMatrix cellAtRow:r column:c] setImage: [theArray objectAtIndex:i];
}
Here comes the problem. (I'm actually not sure if it is a problem at
all, but it's frustrating nonetheless)
When all the images are set, and i scroll the matrix, the scrolling is
slow. (Dual G4 1GHZ) When i compare this to the scrolling speed of
iPhoto for example, it's 10x slower.
When i scrolled to the bottom completely, and then try again, the
scrolling goes a lot faster, cause the images have been displayed
already.
The question is: is there a way to let it scroll faster from the
beginning? Does it have something to do with caching?
Thanks in advance,
Florian Soenens.
| Related mails | Author | Date |
|---|---|---|
| Florian Soenens | Jan 27, 07:27 | |
| Nat! | Jan 27, 18:36 |






Cocoa mail archive

