Re: What's the point of @properties?
Re: What's the point of @properties?
- Subject: Re: What's the point of @properties?
- From: Matt Neuburg <email@hidden>
- Date: Wed, 22 Sep 2010 18:25:56 -0700
- Thread-topic: What's the point of @properties?
On or about 9/22/10 5:06 PM, thus spake "Ken Ferry" <email@hidden>:
> but previously you could only make an IBOutlet called cancelButton by having
> an ivar called cancelButton.
That's just not so. Let's not mix apples and oranges.
* An outlet is a thing in the nib.
* IBOutlet is not an outlet; it's just a phrase in Xcode, acting as a hint
to Interface Builder from Xcode; it saves you time, if you wish, by telling
Interface Builder that an outlet by this name might be a possibility. But
Interface Builder does not, and never did, *require* that hint in order to
define an outlet name.
In the current version of IB, you can go to Library > Classes > Outlets and
define an outlet name. If you do this and, say, add an outlet name called
"howdy" on some nib object, and draw the outlet with that name, then when
the nib loads, setHowdy: will be called on the corresponding instance if it
exists - even though there is no ivar with that name.
If you don't believe me I'll send you a project that demonstrates.
Indeed, I remember when this was the *only* way to define an outlet name;
there was no such thing as the IBOutlet hint in Xcode. m.
--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, 2nd edition
http://www.tidbits.com/matt/default.html#applescriptthings
Take Control of Exploring & Customizing Snow Leopard
http://tinyurl.com/kufyy8
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden