ObjC procedure vs C procedure within Cocoa
ObjC procedure vs C procedure within Cocoa
- Subject: ObjC procedure vs C procedure within Cocoa
- From: "Frederick C. Lee" <email@hidden>
- Date: Fri, 10 Feb 2006 15:55:50 -0800
I have a simple question, from viewing a Quartz example code written
with Cocoa.
There a 'C' procedure signature:
void doAlphaRects(CGContextRef context) {...}
mixed with ObjC procedures like:
- (void)drawRect:(NSRect)rect {
...
doAlphaRects(context); // This calls the 'C' procedure.
}
==========
My question: why mix when you can use ObjC vs C:
- (void) doAlphaRects(...) {....}
called by:
[self doAlphaRects:context]; ?
Is there an advantage to mix 'C' constructs or is it just style
preference?
That is,
void doAlphaRects(CGContextRef context){} vs -(void) doAlphaRects
(...){}
Ric.
_______________________________________________
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