• 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:02:14 -0400


On Aug 4, 2006, at 8:52 PM, Jakob Olesen wrote:

Ugh! I did this for years under MacOS 9....

Yeah, well. Did you get random exceptions back then? :-)

No, I had to use Windows for that....

There is no free lunch when doing multiprocessing. You can use a thread and deal with the issues, or you can use cooperative multitasking and deal with some other issues.

OK, got it.

Generally, the single-threaded option is easier. Especially when Core Data is involved.

I can see that, but other posters indicate that if I really want the document-modal behavior, I have to use threads.


[progressBar performSelectorOnMainThread:@selector(setDoubleValue:) withObject:[NSNumber mumble] waitUntilDone:NO];

You can't call -[setDoubleValue:] like that since it takes a double argument, not an object. The result is a double composed of 32 bits of pointer and 32 bits of garbage.

No NSNumber. In fact, I was passing an int, which appears to be correctly promoted to a double when called directly.


But I see what you mean. The argument has to be an object. Subtle.

Thanks.

Bill Coleman, AA4LR, PP-ASEL        Mail: email@hidden
Quote: "We invented personal computing."
            -- Bill Gates @ TechNet / MSDN 2003


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

  • Prev by Date: Re: resolving aliases
  • 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