Skip navigation.
 
mlFaster scrolling of images
FROM : Florian Soenens
DATE : Sat Jan 25 18:53:55 2003

Hello,

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. Depending
on the count of images, the Matrix rebuilds itself. This goes all well
and fast. 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
very slow. 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.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
No related mails found.