Re: "You can create a window on a secondary thread."
Re: "You can create a window on a secondary thread."
- Subject: Re: "You can create a window on a secondary thread."
- From: Jerry Krinock <email@hidden>
- Date: Tue, 06 Mar 2007 12:28:22 -0800
- Thread-topic: "You can create a window on a secondary thread."
on 07/03/06 11:56, j o a r at email@hidden wrote:
> That your application "cannot continue" before you have downloaded
> this piece of data doesn't mean that you need to block the main
> thread for the duration. Just save the current state and do the
> download using the asynchronous APIs (No need for you to maintain
> that second thread). Once the download is completed, continue
> whatever you were about to do. You can re-design your app in this
> way, and it's the right way to do it (IMO).
Oh yes, I've used -[NSURLConnection connectionWithRequest:delegate:]
extensively and it is wonderful to avoid multithreading.
But in this case it's more complicated; first, I may need to wait for the
user to log in, in another app. Then, I need to get data from one
NSURLConnection, process it, then another, iterating until done, and finally
do some processing on the aggregate before continuing. I thought that
running the Progress Dialog in another thread would be the most
straightforward approach, and also if I can get such a class working I have
plans to re-use it elsewhere.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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