Re: NSNotificationCenter not working
Re: NSNotificationCenter not working
- Subject: Re: NSNotificationCenter not working
- From: Matt Jaffa <email@hidden>
- Date: Wed, 31 Mar 2004 20:27:39 -0700
hmmm even doing NSDistributedNotificationCenter is not working,
here is what i am doing: I actually tried 2 ways and both didn't work
1st way:
Sender:
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:@"com.mf.inverton" object:@"com.mf.inverton"];
Receiver:
[[NSDistributedNotificationCenter defaultCenter] addObserver:callbacks
selector:@selector(invertOn)
name:@"com.mf.inverton" object:@"com.mf.inverton"];
2nd way:
Sender:
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:@"com.mf.inverton" object:nil];
Receiver:
[[NSDistributedNotificationCenter defaultCenter] addObserver:callbacks
selector:@selector(invertOn)
name:@"com.mf.inverton" object:nil];
Both ways don't work,
Please any advice.
Thanks,
Matt
On Mar 31, 2004, at 4:44 PM, m wrote:
>
On Mar 31, 2004, at 3:04 PM, Matt Jaffa wrote:
>
>
> I have two apps running, one is my StartupDaemon and the other is a
>
> System Preference plug-in I made,
>
> When I click on this button I want it to send a notification, that the
>
> Daemon can pick up on,
>
>
{he's trying to use [NSNotificationCenter defaultCenter]}
>
>
[NSNotificationCenter defaultCenter] is local to applications (it's
>
not shared among processes). To do what you want look at
>
NSDistributedNotificationCenter instead.
>
>
_murat
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.