• 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: Marcel Weiher <email@hidden>
  • Date: Mon, 28 Apr 2003 15:44:41 +0200

* 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.

Hmmm...is this limitation to an indeterminate progress bar documented somewhere? I could swear that I've been using a 'normal' progress bar with threaded animation just fine.

* 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.

Hmmm...are you sure it needs to be protected? After all, there is only one writer (and typically only one reader) and the value is non-critical, meaning that having a slightly out-of-date value only means that you will get the final value a little later.

Then you can use an NSTimer to periodically update your progress bar while processing is taking place.

Or alternatively let the threaded-animation take care of this, just setting the state as needed.

This lets you make your application responsive, including giving you the ability to implement a "Cancel" button.

Yup.

Marcel

--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
_______________________________________________
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.

References: 
 >Re: Reponsiveness of application (From: Chris Hanson <email@hidden>)

  • Prev by Date: Hiding empty NSButton cells in a matrix
  • Next by Date: Re: converting text input in any encoding to unicode
  • Previous by thread: Re: Reponsiveness of application
  • Next by thread: getting the size of the current window
  • Index(es):
    • Date
    • Thread