Re: Reponsiveness of application
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.