• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSView needsDisplay in Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSView needsDisplay in Tiger


  • Subject: NSView needsDisplay in Tiger
  • From: John Nairn <email@hidden>
  • Date: Mon, 23 May 2005 17:24:26 -0600

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)
Web Page: http://www.mse.utah.edu/~nairn


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: NSImage size?
  • Next by Date: Re: Persistent Stores and Packages ...
  • Previous by thread: CIContext and performance differences
  • Next by thread: Does retain not work on ids?
  • Index(es):
    • Date
    • Thread