• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: newbie pointer dilemma...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: newbie pointer dilemma... (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re:
  • Next by Date: Accessing images in (public) frameworks?
  • Previous by thread: Re: newbie pointer dilemma...
  • Next by thread: Re: Tracking files the right way -- NeXT apps are less intuitive with worse HI?
  • Index(es):
    • Date
    • Thread