• 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
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: outlet initialization


  • Subject: Re: outlet initialization
  • From: "John C. Randolph" <email@hidden>
  • Date: Tue, 22 Apr 2003 14:35:07 -0700

On Tuesday, April 22, 2003, at 01:03 PM, Yang, Liu wrote:

I am new to Cocoa. I plan to use "awakeFromNib" to set my outlet init value
after the nib is loaded. Is that a good idea?

Yes, that's perfectly acceptable.

If use the "set<ivar>" mechanism, where should this method be implemented?
in the controller that the outlet is connected to? And when will this method
be called?

This is just a matter of the nib-loading code respecting the accessor methods if they exist. You can't rely on any particular sequence of the setters getting called.

-jcr

John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: NSConstantString?
  • Next by Date: Debugging distributed objects
  • Previous by thread: RE: outlet initialization
  • Next by thread: SIGBUS when closing NSWindow
  • Index(es):
    • Date
    • Thread