• 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: Reponsiveness of application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reponsiveness of application


  • Subject: Re: Reponsiveness of application
  • From: Chris Hanson <email@hidden>
  • Date: Sun, 27 Apr 2003 13:59:04 -0500

You have a few options.

* Use an indeterminate progress bar and tell the progress bar to use threaded animation. This will cause a barber-pole effect in the progress bar, making it obvious your application is doing something, but it won't make the application responsive.

* Split your processing off into a thread, and periodically update an instance variable from that thread (protected by a lock of course) indicating how far it's gone. Then you can use an NSTimer to periodically update your progress bar while processing is taking place. This lets you make your application responsive, including giving you the ability to implement a "Cancel" button.

* Process your data in small chunks and drive the processing from an NSTimer or using -performSelector:withObject:afterDelay:. Since this is driven from your application's run loop, your application can also do other things while it's going on.

-- Chris

--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Application Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Reponsiveness of application
      • From: Marcel Weiher <email@hidden>
References: 
 >Reponsiveness of application (From: Ben Kazez <email@hidden>)

  • Prev by Date: Re: Reponsiveness of application
  • Next by Date: NSRegistrationDomain for another application?
  • Previous by thread: Re: Reponsiveness of application
  • Next by thread: Re: Reponsiveness of application
  • Index(es):
    • Date
    • Thread