• 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 17:48:29 -0700

On Tuesday, April 22, 2003, at 02:53 PM, Chris Hanson wrote:

At 12:29 PM -0700 4/22/03, John C. Randolph wrote:
If there's a method named set<ivarname>, it will be used. Otherwise, the ivar is set directly.

Do lots of people depend on this specific behavior, or would it be reasonable to file feature requests asking for nib archiving to use key-value coding instead?

I don't know whether a lot of people use it. I'd say that as a general principle, if there's an accessor method, nib loading should use it (and so should any other code.)

I ask because if one has an outlet named "_foo", when loading a nib you won't be sent -setFoo: as you would if nib archiving used key-value coding. (I believe it will try to send -set_foo:.)

You surmise correctly. However, IB doesn't necessarily know about your real ivar layout (ie, in the class inspector you can tell it you have an outlet named foo, and if there's a -setFoo: method, it will neither know nor care that there's no actual ivar by that name.

-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.

References: 
 >Re: outlet initialization (From: Chris Hanson <email@hidden>)

  • Prev by Date: multiple table views
  • Next by Date: Rendez-vous ...
  • Previous by thread: Re: outlet initialization
  • Next by thread: Re: outlet initialization
  • Index(es):
    • Date
    • Thread