My code broke in Tiger. I have a thread that draws a series of images using
for(i=[doc currentLoaded];i<[[doc archives] count] && movieRunning;i++) { [timeSelector setIntValue:i+1]; [self selectTime:nil]; while(movieRunning) { [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:frameRate]]; if(![plotView needsDisplay]) break; } }
where the internal while(movieRunning) loop sleeps for 1/30 sec (frameRate) and then checks with the view to see if the last image is done. Thus the loop will wait for slow images to finish before continuing or draw at maximum of speed of 30 frames per second for fast images.
Since converting to Tiger, the slow images seem OK, but fast images enter an endless loop because the NSView (here in plotView) always returns YES for needsDisplay even though the image is completely drawn very fast?
--------------- John Nairn (1-801-581-3413, FAX:1-801-581-4816)
|