Re: newbie pointer dilemma...
Re: newbie pointer dilemma...
- Subject: Re: newbie pointer dilemma...
- From: Timothy Ritchey <email@hidden>
- Date: Sat, 31 Aug 2002 14:57:07 -0500
I am not sure this is a problem with understanding pointers (and C), as
it is confusion over the Cocoa API.
Beginning Cocoa programmers see
NSString *foo;
NSArray *bar;
all the time, so when you run across NSRect, what would you assume it
is? Certainly the first time I saw it, I assumed it was a class as
well, until I read the docs and headers to figure out why things
weren't compiling, and noticed it was just a plain old structure.
- tim
On Saturday, August 31, 2002, at 09:00 AM, Ondra Cada wrote:
On Saturday, August 31, 2002, at 04:54 , Jonas Roel wrote:
NSRect *xyz;
&
NSRect xyz;
The latter is not pointer at all. For details, do read some good C
reference -- in my opinion, the old Kernighan/Ritchie is still the
best.
In Cocoa, you mostly use struct values, not pointers, ie. "NSRect foo"
is more common than "NSRect *foo".
_______________________________________________
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.