Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)
Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)
- Subject: Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)
- From: Jonathan Hess <email@hidden>
- Date: Mon, 17 Nov 2008 22:00:12 -0800
On Nov 18, 2008, at 12:49 AM, Brian Stern wrote:
On Nov 18, 2008, at 12:35 AM, Jonathan Hess wrote:
Normally instance variables and properties share the same name,
Normally in your code maybe, not mine.
so it doesn't matter to Interface Builder where the 'IBOutlet' text
appears. If you're going to give your instance variables different
names though, you need to put the IBOutlet qualifier on the
property if you want it to be used.
I guess I just had a perfect storm of issues that made it appear
that things were working differently from the way they were
working. My properties, though present, were ignored. The fact that
it works differently from Mac OS makes it worse.
Which difference are you referring to? It sounds like you're referring
to the fact that if a setter doesn't exist the variable is retained by
setValue:forKeyPath:. To avoid implementing setters, you're free to
them out and let IB directly set you're iVars. If you do that, you'll
just need to release them in dealloc. The best practices are there to
help developers who are new to both platforms. If you feel that you
have an adequate understanding of how the outlets are established,
you're free to use a pattern that you prefer.
Jon Hess
Thanks for the help guys.
--
Brian Stern
email@hidden
_______________________________________________
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
_______________________________________________
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