Re: Core Data: Progress bar using Sheet, modifying context in thread
Re: Core Data: Progress bar using Sheet, modifying context in thread
- Subject: Re: Core Data: Progress bar using Sheet, modifying context in thread
- From: Chris Suter <email@hidden>
- Date: Sat, 5 Aug 2006 11:18:17 +1000
On 05/08/2006, at 7:13 AM, Matt Neuburg wrote:
Date: Fri, 4 Aug 2006 15:39:38 +1000
From: Chris Suter <email@hidden>
Subject: Re: Core Data: Progress bar using Sheet, modifying
context in
thread
To: Matt Neuburg <email@hidden>
Cc: email@hidden
On 04/08/2006, at 3:33 PM, Matt Neuburg wrote:
On Fri, 4 Aug 2006 00:05:51 -0400, Bill Coleman <email@hidden>
said:
I'd like the import or export process to be document-
modal, with the progress of the operation displayed in a sheet.
This
is a little tricky, since once you call beginSheet:
modalForWindow: ..., you can't do any more processing
Why can't you? Sure you can. (Unless you also call
runModalForWindow:, but
that, as I was saying a week or two ago here, would be silly.)
How can you? It's a document modal sheet.
Please explain to me how calling beginSheet:modalForWindow:...
stops code
from "doing more processing".
The guy clearly wants to run a document modal progress sheet for an
import. This implies that it's takes a non trivial time to do it and
so whilst you can carry on doing stuff after you've done beginSheet,
you have to service the run loop at some point and you can't just
periodically do this from your own loop either because you can't
control what other bits of code might do when events are processed.
Really the only way, and correct way, to do what this guy wants to do
is to run a separate thread.
- Chris
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden