Return to the Alphabetic Index
Return to the Class Browser
Return to the Picture Browser
Copyright (c) 1994 by NeXT Computer, Inc. All Rights
Reserved.
NSBundle Additions
Inherits From: NSObject
Declared In: AppKit/NSImage.h
AppKit/NSNibLoading.h
Class Description
The Application Kit adds these methods to the Foundation Kit's NSBundle class.
These methods become part of the class for all applications that use the
Application Kit, but not for applications that don't.
Getting the Location of Images in the File System
- - (NSString *)pathForImageResource:(NSString *)name
Returns the absolute pathname of the file containing the specified
image resource. (The name of the resource is simply the filename without
the path of its bundle directory; the filename extension need not be
included.)
Loading an Interface Builder File
- + (BOOL)loadNibFile:(NSString *)fileName Unarchives the contents
of the nib file whose absolute path
externalNameTable:(NSDictionary *)context is fileName.
Objects from the nib file are allocated in
withZone:(NSZone *)zone the specified zone of memory. The
context argument is a name tablea dictionary whose keys are names
like NSOwner and whose values are existing
objects that can be referenced by the newly unarchived objects. Returns YES
upon success. (A nib file is a object archive whose file format is currently
implementation specific. A public specification of this file format will be
available at a later date.)
- + (BOOL)loadNibNamed:(NSString *)aNibName Similar to
loadNibFile:externalNameTable:withZone:,
owner:(id)owner but the name table's only element is the
specified owner (stored with the key NSOwner).
Objects from the nib file are allocated in owner's zone. If there's a
bundle for owner's class, this method looks in that bundle for the nib
file named aNibName (this argument need not include the
.nib extension); otherwise, it looks in the main
bundle. (A nib file is a object archive whose file format is currently
implementation specific. A public specification of this file format will be
available at a later date.)