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: Ondra Cada <email@hidden>
- Date: Mon, 24 Apr 2006 18:43:39 +0200
William,
On Apr 24, 2006, at 5:19 PM, William Bumgarner wrote:
Given that you wrote the C library, I would suggest adding a (void
*) context argument to your API. Easy & straightforward. Works
regardless of single window vs. document based and your library
will remain portable as it does not introduce any Objective-C'isms
into the library.
It somewhat depends though -- since the implementation is ObjC-based
anyway, it might be better to publish the fact (and make the compiler
check for typos etc.) by declaring the argument an id, or, better,
WhateverClass*.
I would even argue this is much more often case than those when
hiding an object under a void* is beneficial :)
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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