Re: Grabbing "top level" nib objects in 10.2
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