Re: Using C?
Re: Using C?
- Subject: Re: Using C?
- From: Finlay Dobbie <email@hidden>
- Date: Thu, 14 Jun 2001 19:07:32 +0100
you have to place C methods outside of your object declaration, so
therefore obviously there will be no self...
it's normally like this:
void mysomething(void)
{
dosomething();
}
@implementation MyObject
// Self only exists in here
@end
You can mix and match C and Objective-C to your heart's content. if,
int, float, while, for, etc etc are all C things.
Hope that helps,
-- Finlay
On Wednesday, June 13, 2001, at 10:10 pm, <email@hidden>
wrote:
The only real problem I've experienced with my C method is that it seems
unable to call methods of access variables in the same object. Calling
stuff like [self: doSomething] within the C method results in the
warning
"self undeclared." Is it not possible to mix up C and Objective-C like
this? Also, for example, any variables declared in the header file for
the object are also inaccessable in the C function/method.