I have created a plugin for TextEdit and used SIMBL to load it. I am trying to send a notification to NSDistributedNotificationCenter.
To send the notification I am using:
I am using an application called NotificationWatcher to view all the NSNotifications posted, the code above successfully posts the notification however as soon as I add an NSDictionary in userInfo: the notification is not sent.
To create the dictionary I have been using
I do not understand why the notification will not post with a dictionary.
To send the notification I am using:
Code:
NSString *observedObject = @"com.drake.DDX";
NSDistributedNotificationCenter *center =[NSDistributedNotificationCenter defaultCenter];
[center postNotificationName:@"DDXNotification" object:observedObject userInfo:nil deliverImmediately:YES];
I am using an application called NotificationWatcher to view all the NSNotifications posted, the code above successfully posts the notification however as soon as I add an NSDictionary in userInfo: the notification is not sent.
To create the dictionary I have been using
Code:
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:@"TextEdit" forKey:@"applicationName"];
I do not understand why the notification will not post with a dictionary.
Last edited by a moderator: