Re: Accessing Cocoa instance variables from C functions
Re: Accessing Cocoa instance variables from C functions
- Subject: Re: Accessing Cocoa instance variables from C functions
- From: Ryan Britton <email@hidden>
- Date: Fri, 21 Apr 2006 14:01:05 -0700
No. You'll need to either use global variables or (better) pass in
everything you need in the arguments.
On Apr 21, 2006, at 1:52 PM, Damien Sorresso wrote:
I've got an Objective-C class that makes use of a C library I've
written which has several callbacks. I want to implement these
callbacks in my class, but I can't seem to access the class
variables from these callbacks. The compiler tells me that the
instance variables I'm trying to access are undeclared. Here's a
snippet of my code.
void ITPhaseChange(char *message)
{
NSLog(@"PHASE CHANGE: %s\n", message);
[phaseText setStringValue:[NSString stringWithCString:message]];
}
Now with just the NSLog(...), everything compiles fine. But I want
to work with the `phaseText' outlet from within this function. Is
this possible?
--
Damien Sorresso
Macintosh Developer
Computer Infrastructure Support Services
Illinois State University
email@hidden
309.438.5777
_______________________________________________
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