I tried doing this in my objective C method
my_function(self);
my_function(void *param)
{
id self = param;
[self.Output insertText:@"Hello world"];
}
Output is of type NSTextView
.
I get the following errors in compilation
Use of undeclared identifier 'id' in the line "id self = param".
I tried #import <Cocoa/Cocoa.h>
, but didn't help. In the line [self.Output insertText:@"Hello world"];
, I get "Expected expression"
error.
Basically, what i am trying to do is to share some data periodically between my c function(where it's generated) and objective c method(where it's processed and displayed). I am total newbie in objective c, any help is greatly appreciated. If there is a better way to do this than calling objective c methods from C function, I am open to that.