Re: [[NSNotificationCenter defaultCenter] postNotificationName:...] in a C function get error
Re: [[NSNotificationCenter defaultCenter] postNotificationName:...] in a C function get error
- Subject: Re: [[NSNotificationCenter defaultCenter] postNotificationName:...] in a C function get error
- From: Vincent Pottier <email@hidden>
- Date: Tue, 7 Dec 2004 08:26:54 +0100
Le 7 déc. 04, à 01:36, Kevin Callahan a écrit :
What kind of commandline tool template did you start with?
Well it's a Cocoa shell tool (don't work one) and a cocoa application that work. But the issue look to be located in the C funtion, other notification post in Cocoa function work great.
Have you imported Foundation in your header ?
#import <Foundation/Foundation.h>
Yes.
On Dec 6, 2004, at 2:31 PM, Vincent Pottier wrote:
Hello list,
I'd like to do this in a Command line tool:
void callback(u_char *user, const struct u_char *header, const u_char *packet)
{
[[NSNotificationCenter defaultCenter] postNotificationName:@"queuePacket" object:nil userInfo:nil];
}
I always get an error:
*** -[NSNotificationCenter postNotificationName:object:userInfo:options:]: selector not recognized
*** Uncaught exception: <NSInvalidArgumentException>
*** -[NSNotificationCenter postNotificationName:object:userInfo:options:]: selector not recognized
lf I run the same code within a cocoa application I don't get the error. Someone can explain me this issue?
Thanks in advance
Vincent _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden