• 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: Accessing objects in a nib file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing objects in a nib file


  • Subject: Re: Accessing objects in a nib file
  • From: j o a r <email@hidden>
  • Date: Wed, 2 Jul 2003 19:52:51 +0200

You get hold of the objects in a nib file by loading the nib file (using the methods from NSBundle: "loadNibFileNamed:owner:" - part of the additions to NSBundle found in AppKit).
The objects will be hooked up to the "outlets" (ie. instance variables) of the "files owner" of the nib file - that could be "you" (ie. the object loading the nib file).

If you are loading a nib file without being the nib file owner, you can still get hold of the objects in the nib file using the "externalNameTable:" functionality of the nib loading mechanism (again, see NSBundle). Use the list archives to find out more about this, since it's a very non-standard thing to do. List archives found here:

<http://cocoa.mamasam.com/>

j o a r

On Wednesday, Jul 2, 2003, at 19:13 Europe/Stockholm, Daniel Aarno wrote:

Well, maybe I wasn't clear. I want to access the object from within an obj-C source file. The instance in the code is not represented in IB. The nib file is in the applications main bundle if it makes a difference.
_______________________________________________
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: Re: Rép : -awakeFromNib, application releasing
  • Next by Date: Anyone interested on taking a small project ??
  • Previous by thread: Re: Accessing objects in a nib file
  • Next by thread: Background application
  • Index(es):
    • Date
    • Thread