• 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: Core Data: Progress bar using Sheet, modifying context in thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Core Data: Progress bar using Sheet, modifying context in thread
      • From: Bill Coleman <email@hidden>
  • Prev by Date: Re: refreshObject:mergeChanges: vs. stale transient properties
  • Next by Date: Re: Core Data: Progress bar using Sheet, modifying context in thread
  • Previous by thread: Re: Core Data: Progress bar using Sheet, modifying context in thread
  • Next by thread: Re: Core Data: Progress bar using Sheet, modifying context in thread
  • Index(es):
    • Date
    • Thread