Skip navigation.
 
mlLoading images in an array while app is loading
FROM : Florian Soenens
DATE : Wed Jan 29 16:58:54 2003

Hello all,

i have the following question:

I have an app with an NSMatrix. The matrix has a lot of imageCells.
There is an array with all the paths to the images loaded in the
awakeFromNib of my appController.
Then i do a loop in the awakeFromNib as so:

for(i = 0;i < [theArray count];i++)
{
// supose theRow and theColumn have been calculated
[[theMatrix cellAtRow:theRow column:theColumn] setImage:
            [[NSWorkspace sharedWorkspace] iconForFile:[a
objectAtIndex:i]]];
}

When the array is huge, (let's say 1000+ paths), i takes a lot of time
for my app to start up.

Is it possible to start the app, set the first 50 images or so, and
then, in the background load the rest of them?

Thanks in advance,

Florian Soenens
   
   


Related mailsAuthorDate
mlLoading images in an array while app is loading Florian Soenens Jan 29, 16:58
mlRe: Loading images in an array while app is loading Brian Bergstrand Jan 30, 01:02