• 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: Interface Builder Outlets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interface Builder Outlets


  • Subject: Re: Interface Builder Outlets
  • From: Ondra Cada <email@hidden>
  • Date: Fri, 16 Dec 2005 13:53:51 +0100

J o a r,

On 16.12.2005, at 8:38, j o a r wrote:


I think that one of the advantages of Cocoa+ObjC is that you rarely ever really have to care about pointers - you can think of it as dealing with objects


Personally, I feel the distinction betwixt pointers to objects and objects themselves is *very* important. There are people with some C+ + background, and you can have object variables there: that may get confusing.

Especially for someone with good background in plain C, in my personal opinion, it is worth to say (which, to be fair, the docs do pretty well):

(a) any "object variable" is in fact a pointer to an object (which itself is a memory chunk);
(b) an "outlet" is a normal object variable; we just by convention call it "outlet" if its contents is to be set up from an NIB;
(c) there's a special identifier "IBOutlet", which is ignored by compiler (just #define'd to nothing), but allows Interface Builder to recognise its outlets.

There are a few other subtleties (like that IB for historical reasons would recognise plain ids as outlets too), but the above, I guess, sums it roughly up, and should be told to anyone who starts with Cocoa. Perhaps using a better formulation than mine :)
---
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
  • Follow-Ups:
    • Re: Interface Builder Outlets
      • From: Derrick Bass <email@hidden>
References: 
 >Interface Builder Outlets (From: Jonathan Faulkenberry <email@hidden>)
 >Re: Interface Builder Outlets (From: John Pannell <email@hidden>)
 >Re: Interface Builder Outlets (From: Boyd Collier <email@hidden>)
 >Re: Interface Builder Outlets (From: j o a r <email@hidden>)

  • Prev by Date: Re: Getting data from NSOutlineView [solved, kind of...]
  • Next by Date: Warnings with NSError **
  • Previous by thread: Re: Interface Builder Outlets
  • Next by thread: Re: Interface Builder Outlets
  • Index(es):
    • Date
    • Thread