• 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: Grabbing "top level" nib objects in 10.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grabbing "top level" nib objects in 10.2


  • Subject: Re: Grabbing "top level" nib objects in 10.2
  • From: "Martin" <email@hidden>
  • Date: Tue, 19 Oct 2004 14:45:46 -0700

NSBundle's "loadNibFile:externalNameTable:withZone:" method will fill in an array of these "top level objects" if you ask it to:

NSMutableArray* topLevelObjects = [NSMutableArray array];
NSDictionary* context = [NSDictionary dictionaryWithObjectsAndKeys:
owner, @"NSOwner",
topLevelObjects, @"NSTopLevelObjects",
nil];
BOOL isLoaded = [bundle loadNibFile:name externalNameTable:context withZone:[owner zone]];

Archived thread on this subject:

http://www.cocoabuilder.com/archive/message/cocoa/2002/4/3/53561

~Martin


On October 19 2004, R. Scott Thompson <email@hidden> wrote:

>It would appear that 10.3 introduced the class NSNib which can return
>an array of the "top-level objects" in a NIB file. Presumably those
>are the named objects in the IB Project window?
>
>Is there any way to get ahold of one of those objects by name in 10.2?
>Or do I have to have a connection to them (directly or indirectly)
>from the file's owner?



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Custom view and framework bug
  • Next by Date: [SOLVED] Binding nested objects
  • Previous by thread: Grabbing "top level" nib objects in 10.2
  • Next by thread: Project Builder broken
  • Index(es):
    • Date
    • Thread