Foundation Tool and NSDistributedNotificationCenter
Foundation Tool and NSDistributedNotificationCenter
- Subject: Foundation Tool and NSDistributedNotificationCenter
- From: Zephyroth Akash <email@hidden>
- Date: Fri, 23 Oct 2009 17:37:28 +0200
Hi,
I'm writing a Foundation Tool which detect some hardware components
and launch an application.
Once the application is running it ask the user to make a choice and
then post a notification to the "daemon".
It works fine, the tool get the notification and do its work ... but
I'm unable to notify the application that the work is done.
Nothing happens.
At the end of my "main.m":
NSDistributedNotificationCenter *dnc =
[NSDistributedNotificationCenter defaultCenter];
[dnc addObserver:hardDetect selector:@selector(getBootInfo:)
name:@"getBootInfo" object:nil];
[[NSRunLoop currentRunLoop] run];
hardDetect is an instance of "HardwareController.m" in which I've used
another NSDistributedNotificationCenter but it don't seem to be the
right way.
I think I need to use the Distributed Notification Center defined in
"main.m" but I don't know how to access it from "HardwareController.m".
Zephyroth.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden