On or about 9/22/10 5:06 PM, thus spake "Ken Ferry" <kenfe...@gmail.com>:

> Š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 = m...@tidbits.com, 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to