I would like to add notification center from a cpp class, is it possible????
If so, how do I do it?
Manager.h
class Manager
{
Manager();
};
Manger.mm file
Manager:Manager()
{
[[NSNotificationCenter dafaultCenter] addObserver:self selector:@selector(workermethod) name:@" Name" object:(id)nil];
}
My compiler gives an error saying self is not declared.......yes i know it is an obvious error.
Since I'm not deriving from NSObject.... Please let me know if it is possible to add notification center to cpp class in Cocoa??