On Jan 31, 2010, at 9:13 PM, Patrick Cusack wrote:

> What I want to do is this: display a spinning icon in a transparent overlay 
> window (I can do this no problem) while my program is saving, printing PDFs, 
> etc. These methods as typically defined in NSDocument do not have areas where 
> you can inject a call to update a progress bar. I'm thinking about - 
> (BOOL)writeToURL:(NSURL *)absoluteURL ofType:(NSString *)typeName 
> error:(NSError **)outError . I want to draw a circular-spinning-progress-ish 
> indicator on a transparent window so that the user understands why the UI is 
> temporarily locked when these methods are being called. Am I fitting a round 
> peg in a square whole?

Yes :). If there's an operation that blocks for a long time, you should run it 
on a background thread so the UI remains responsive, instead of running it on 
the main thread and trying to update the UI in the background. Look into using 
NSOperation (or dispatch queues on 10.6).

—Jens_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to