• 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
Re: View does not get refreshed after Window deminimized...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: View does not get refreshed after Window deminimized...


  • Subject: Re: View does not get refreshed after Window deminimized...
  • From: cocoa learner <email@hidden>
  • Date: Fri, 12 Mar 2010 08:30:20 +0530

Hummm... looks like my approach has flaw.

Thanks a ton,
Cocoa.learner

On Thu, Mar 11, 2010 at 11:52 PM, Quincey Morris <
email@hidden> wrote:

> On Mar 11, 2010, at 06:50, cocoa learner wrote:
>
> > And on this custom view I have a progress bar, that progressbar gets it's
> > progress value from a NSThread. And I am using following function render
> the
> > progressbar, from NSThread -
> >
> >
> > [progBar performSelectorOnMainThread: (display) withObject: nil
> > waitUntilDone: YES];
>
> There seem to be two things wrong here.
>
> First, you must *not* set the value of the progress bar from a non-main
> thread. Setting the value causes a UI update, and that won't work properly
> unless it's done on the main thread. Instead, you must devise a method for
> the background thread to pass the desired value to the main thread, and have
> the main thread set the progress bar value.
>
> Second, it's rarely correct to invoke [NSView display] yourself. Typically,
> you would use [NSView setNeedsDisplay].
>
> In any case, it's not clear why you think you need to cause the progress
> bar to redisplay. If you set the value properly from the main thread, it
> will redisplay itself as necessary. If you're having a problem with the
> animation not running, you just need to make sure you set (or re-set) the
> value often enough.
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >View does not get refreshed after Window deminimized... (From: cocoa learner <email@hidden>)
 >Re: View does not get refreshed after Window deminimized... (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Core Animation vs. Basic Cocoa Graphics
  • Next by Date: Use of KVC Array operators
  • Previous by thread: Re: View does not get refreshed after Window deminimized...
  • Next by thread: IsFileOnARemoteVolume
  • Index(es):
    • Date
    • Thread