• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Outlet Initialization Uses Accessors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Outlet Initialization Uses Accessors (From: Gordon Apple <email@hidden>)

  • Prev by Date: Re: Parse form values from HTTP POST
  • Next by Date: Re: MacBook Wake On Lan
  • Previous by thread: Re: Outlet Initialization Uses Accessors
  • Next by thread: Embed some NSControl in the NSTableView field?
  • Index(es):
    • Date
    • Thread