Raise an event from inside native c function? <p>I am developing an application that does a callback to a native c function after playing a system sound. I would like to raise an event when this happens, so a subscriber on my view may handle it.</p> <pre><code>-(void) completionCallback(SystemSoundID mySSID, void* myself) { [[NSNotificationCenter defaultCenter] postNotificationName:@"SoundFinished" object: myself]; } </code></pre> <p>I recieve <code>unrecognized selector sent to instance ...</code></p> <p>On the view, I have the following code:</p> <pre><code>[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(soundStopped) name:@"SoundFinished" object:nil]; </code></pre> <p>...</p> <pre><code>-(void) soundStopped: (NSNotification*) notification { NSLog(@"Sound Stopped"); } </code></pre> <p>I am extremely new to objective-c, where am I going wrong?</p> <p>Update The exact error is:</p> <pre><code> 2011-04-18 19:27:37.922 AppName[5646:307] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[BackgroundTestViewController soundStopped]: unrecognized selector sent to instance 0x13b4b0' </code></pre>