• 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: Toplevel Objects in NIB files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toplevel Objects in NIB files


  • Subject: Re: Toplevel Objects in NIB files
  • From: Nicholas Riley <email@hidden>
  • Date: Tue, 2 Apr 2002 20:08:31 -0600
  • Mail-followup-to: Sherm Pendley <email@hidden>, Nat! <email@hidden>, email@hidden

On Tue, Apr 02, 2002 at 08:26:52PM -0500, Sherm Pendley wrote:
> FWIW, I don't recall seeing any really good documentation about this -
> and I looked hard, because it's very important for supporting
> dynamically-loaded NIBs within a language bridge. I figured it out for
> CamelBones by coding my proxy class to report the name of each method
> asked for with "respondsToSelector:", and then noticed that a call to
> "setWhatever:" got generated for each outlet I wired up in my NIBs.

The behavior you're seeing - where a method is used, then if it
doesn't respond, an instance variable is used - is the result of
key-value coding.

<http://developer.apple.com/techpubs/macosx/Cocoa/Reference/Foundation/ObjC_classic/Protocols/NSKeyValueCoding.html>

Even if NSNibOutletConnector isn't using take[StoredValue:forKey:, the
resulting behavior is similar.

I've been caught by this a number of times when I happened to have
implemented a setXXX method and was confused why an outlet wasn't
being hooked up! Key-value coding is very flexible, and I use it a
lot especially when reading/writing data.

--
=Nicholas Riley <email@hidden> | <http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
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.

  • Follow-Ups:
    • Re: Toplevel Objects in NIB files
      • From: Sherm Pendley <email@hidden>
References: 
 >Toplevel Objects in NIB files (From: Nat! <email@hidden>)
 >Re: Toplevel Objects in NIB files (From: Sherm Pendley <email@hidden>)

  • Prev by Date: Re: NSData question
  • Next by Date: Re: How to get objects to not be encoded with NSArchiver
  • Previous by thread: Re: Toplevel Objects in NIB files
  • Next by thread: Re: Toplevel Objects in NIB files
  • Index(es):
    • Date
    • Thread