Re: Outlet Initialization Uses Accessors
Re: Outlet Initialization Uses Accessors
- Subject: Re: Outlet Initialization Uses Accessors
- From: Jonathan Hess <email@hidden>
- Date: Wed, 20 Aug 2008 19:15:55 -0700
Yes it does. One thing to be aware of is that this can lead you to
retain your outlets. Also, if you have an action named '-(IBAction)
setFoo:(id)sender' and an outlet named foo, setting the outlet at
runtime will be defeated by the existence of the action with the
matching KVC name.
It's best not to have action names that start with 'set' -
Jon Hess
On Aug 20, 2008, at 8:09 AM, Gordon Apple wrote:
I just had a revelation I though I would share -- thanks to some
sample
code David Duncan sent me. When IB makes a connection, it calls the
outlet's accessor, if one is available. That fact can be used to
initialize
related items in your code. Ok, maybe everybody but me already knew
that,
but maybe a few don't know or just hadn't thought about it.
G. Apple
_______________________________________________
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