• 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: Bill Coleman <email@hidden>
  • Date: Fri, 4 Aug 2006 23:07:56 -0400


On Aug 4, 2006, at 9:18 PM, Chris Suter wrote:

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.

OK, so let's say we use a separate thread, and we carefully marshall all the points where we update the progress indication by calling a selector on the main thread.


There's still the issue of Core Data being fussy with operations from other than the main thread.

--

Currently, I've re-coded the import / export to run in the menu action method. It works, and the progress works, but the behavior is actually application-modal, even though it looks document-modal.

Thanks guys, this is real helpful!

Bill Coleman, AA4LR, PP-ASEL        Mail: email@hidden
Quote: "Boot, you transistorized tormentor! Boot!"
            -- Archibald Asparagus, VeggieTales

_______________________________________________
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: Chris Suter <email@hidden>
References: 
 >Re: Core Data: Progress bar using Sheet, modifying context in thread (From: Chris Suter <email@hidden>)

  • Prev by Date: Re: Core Data: Progress bar using Sheet, modifying context in thread
  • 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