Re: Interface Builder Outlets
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