Re: Objective-C question
Re: Objective-C question
- Subject: Re: Objective-C question
- From: Ondra Cada <email@hidden>
- Date: Wed, 5 May 2004 02:50:37 +0200
On 5.5.2004, at 2:19, Scott Thompson wrote:
>
That's not entirely true. I mean, if I write a C function and pass
>
it a pointer to an Objective-C object then I can access the instance
>
variables of the object:
>
>
void MyCFunction(ObjectiveCClassWithInstanceVariables *someObject)
>
{
>
int fred = someObject->anInstanceVariable;
>
}
>
>
There should be nothing wrong with that.
There is a number of potential wrongs with that, more or less all of
them harping on the subject of "broken encapsulation". At the very
least, I would recommend using KVC instead (unless your function is
pretty low-level and very often-called).
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.