• 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: NSProgressIndicator's setUsesThreadedAnimation only works sometimes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSProgressIndicator's setUsesThreadedAnimation only works sometimes?


  • Subject: Re: NSProgressIndicator's setUsesThreadedAnimation only works sometimes?
  • From: Keary Suska <email@hidden>
  • Date: Sat, 14 Mar 2009 11:17:51 -0600


On Mar 13, 2009, at 4:20 PM, Sean McBride wrote:

Hi all,

I'm trying to make a cheap, modal, indeterminate progress dialog, but
I'm having trouble animating the progress bar.

(Yes, I know this is only slightly better than the spinning wheel of
death. Yes, I know I should thread my long running code. Yes, I know I
should not block the main thread. One day...)


The docs for NSProgressIndicator's setUsesThreadedAnimation say "This
value is only a hint and may be ignored". Indeed, sometimes it animates
and sometimes it does not. I can't find any pattern.


Is there a way to reliably make an NSProgressIndicator animate while the
main thread is blocked?


I have had success using -beginModalSessionForWindow: and an NSTimer that calls a method that checks for an end condition and calls - runModalSession:.

I have mostly used this in cases where I needed asynchronous behavior but I need to block the UI.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

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: 
 >NSProgressIndicator's setUsesThreadedAnimation only works sometimes? (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: How to create an NSDecimal?
  • Next by Date: Re: Messages between Threads
  • Previous by thread: Re: NSProgressIndicator's setUsesThreadedAnimation only works sometimes?
  • Next by thread: kvc/kvo for arrays defeated me.
  • Index(es):
    • Date
    • Thread