| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
This should be painfully obvious, but you're listening for a notification with name = @"MFInvertOff" but in a previous message, you included source that posts notifications with name = @"com.mf.inverton"_______________________________________________
Could that be the problem?
_murat
On Mar 31, 2004, at 9:24 PM, Matt Jaffa wrote:
still to no avail is it working,_______________________________________________
I have this app that I downloaded that watches all Notifications from
NSDistributedNotificationCenter.
My System Preference Plugin is correctly posting notifications
But my Foundation / CoreFoundation / Cocoa Daemon is not picking
it up.
My daemon has a main function with a included file for a obj-c class I
made,
That class is going to be the observer as here:
int main() {
..........
........
othercode
........
.........
CallBack * callbacks = [[CallBack init] alloc];
[callbacks loadStuff];
[[NSDistributedNotificationCenter defaultCenter] addObserver:callbacks
selector:@selector(invertOff:)
name:@"MFInvertOff" object:nil];
daemon(0,0)
while(...) {
......
}
release stuff etc.
}
Later in the code daemon(0,0) is called and it goes in a forever
while loop using sockets to communicate with something else,
Does this kind of scenario the thing that is killing my possibility to
use NSDistributedNoticationCenters?
this is my Callback class:
#import "CallBack.h"
@implementation CallBack
- (void)loadStuff
{
conditional_val = 0;
}
- (int)returnCondition
{
return conditional_val;
}
- (void)setCondition:(int)condition
{
conditional_val = condition;
}
- (void)invertOn:(NSNotification *)myNotification
{
conditional_val = 0;
printf("Inverton was called\n");
}
- (void)invertOff:(NSNotification *)myNotification
{
conditional_val = 1;
printf("InvertOff was called\n");
}
@end
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.
| References: | |
| >NSNotificationCenter not working (From: Matt Jaffa <email@hidden>) | |
| >Re: NSNotificationCenter not working (From: m <email@hidden>) | |
| >Re: NSNotificationCenter not working (From: Matt Jaffa <email@hidden>) | |
| >Re: NSNotificationCenter not working (From: m <email@hidden>) | |
| >Re: NSNotificationCenter not working (From: Matt Jaffa <email@hidden>) | |
| >Re: NSNotificationCenter not working (From: m <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.