• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using C?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: More thoughts on Visualizing Cocoa
  • Next by Date: Re: Cocoa, a complete Mac OS X API?
  • Previous by thread: Re: Using C?
  • Next by thread: Re: Using C?
  • Index(es):
    • Date
    • Thread