• 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
NSNotifications between threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSNotifications between threads


  • Subject: NSNotifications between threads
  • From: Damien Sorresso <email@hidden>
  • Date: Wed, 10 Aug 2005 16:50:46 -0500

In my app, I need a worker thread to continuously update a progress bar. Basically, it tells it that it's done scanning a directory. So, in the worker thread, I've set it up to post a notification with a `userInfo' dictionary.

I've read Apple's docs on the subject posted here:
http://developer.apple.com/documentation/Cocoa/Conceptual/ Notifications/Tasks/Threading.html


I've implemented the threading support in the observer object as described in the document, but for some reason, the ``handleMachMessage" delegate method is never getting called! Everything gets initialized So of course, the notifications aren't getting dispatched to the proper thread. Everything works fine up until that point. The worker thread is posting the notifications, and the proper method is getting them in the observer. But they're not being enqueued correctly.

Also, I've set the progress bar in question to use threaded animation. Will this cause problems updating it in this fashion?

Any help is greatly appreciated.
--
Damien Sorresso
Macintosh Developer
Computer Infrastructure Support Services
Illinois State University
email@hidden
309.438.5777

_______________________________________________
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: NSNotifications between threads
      • From: Milton Sagen <email@hidden>
  • Prev by Date: Run Bash script as root
  • Next by Date: Re: Run Bash script as root
  • Previous by thread: Re: Run Bash script as root
  • Next by thread: Re: NSNotifications between threads
  • Index(es):
    • Date
    • Thread