site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=Vb9jxrzFjnuUQ16dHyoLP41WTgqI3j9zfU7WE1FP0Os=; b=gyVl+gnt02iXYxjWPK0ZL50UD+NiP3jnjyi4KqzIN7Fwh+AOzs/4bNdmd9UVsvUP6J 9heQ8HYkcj9q4yc3xZIeYzClCAHc8RMeKocGiPYJNPgwklWv6XCSwBLXHt+LWyA98ZvE ABDtmraxwhBgPtQYMvn7A75+hNw8huB1a8Mso= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=jJ8MJoe/ijycLaKxnwfvaUi9cjCC02sGG9Awzsx5lr4AOCjPVpefqUi0eo1ALV2wOH 0+T1UYxb0fF5hkjShfnP8qy3i+LE+kH4ombYOjmc6B1eoI5dcIcm+zd26y83NfZSEFAi jT5r7ETTv8ePDIuJVSPBpElIxNLaHUKvZ/j3E= Future inquires regarding CF/Cocoa should be sent to Cocoa-dev.
Now I'm trying to get the data I received out of my thread. I'm posting a CFNotification to the local center.
CFNotificationCenterPostNotification( CFNotificationCenterGetLocalCenter(), CFSTR("news"), NULL, nfodict, false);
Why are you using CFNotificationCenter to post the notification instead of NSNotificationCenter? This is probably what you want: [[NSNotificationCenter defaultCenter] postNotificationName: @"news" object: nil userInfo: nfodict]; If you want to send the notification to another thread, you can use a trampoline method with -performSelector:onThread:... Remember that notifications are delivered on the same thread that -postNotificationName:... was called.
But in some other thread I'm not receiving it. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(NoteCallBack:) name:@"news" object:NULL];
I'm betting you're not running the run loop in your secondary thread. Here's an example of how to use NSNotificationCenter to deliver a notification on a secondary thread: http://pastie.org/845544 Delivering a notification on the main thread (from a secondary thread) is considerably easier thanks to -performSelectorOnMainThread:...
In two threads (in one application) do I need to use the distibuted center?
No - NSDNC should be reserved for IPC between separate processes. NSNC works fine for inter-thread communication. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com