Re: C to Objective-C
Re: C to Objective-C
- Subject: Re: C to Objective-C
- From: Manfred Lippert <email@hidden>
- Date: Fri, 4 Oct 2002 19:44:51 +0200
How do I write this C call in Cocoa?
Wrong question. C is a programming language, Cocoa is a framework
(class library).
How should I write it in Objective-C?
This a better question. ;-) C and Obj-C are both programming languages.
But you do not need to rewrite your C code, because Obj-C _is_ actually
C. Just with a few "little" extensions ...
C is a subset of Obj-C.
I've tried - (void)verticesX:(float)xVert[] Y:yVert[] T:(int)TOTAL;
You tried to make an Obj-C method (or selector or whatever you call it)
from the C function. This makes no sense without having a class to
write the method for.
To use it in a class you have to rethink your whole problem to solve it
in a object oriented way instead of a function oriented way.
Regards,
Mani
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.