Re: Pointer to static object member
Re: Pointer to static object member
- Subject: Re: Pointer to static object member
- From: Marcel Weiher <email@hidden>
- Date: Thu, 26 Sep 2002 10:00:26 +0200
On Thursday, September 26, 2002, at 03:37 Uhr, John Scalo wrote:
Is it possible to get a pointer to a static object member?
What's a static object member? Do you mean an instance variable?
Anyway, yes it is possible to get pointers to instance variables, but
you don't want to do this.
i.e. the equivalent of "&[myFileObj fsRef]".
No, that won't work, because you can't take the pointer of an
expression:
&(3+4)
doesn't work.
I'm thinking this must border on obvious, but haven't found it
documented anywhere.
It isn't documented anywhere, because you're not supposed to do it.
You are supposed to use methods to access an object's data.
If you have API that requires a pointer to the value, put it in a temp
and pass a pointer to that.
Marcel
--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
_______________________________________________
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.