- Inherits from:
- NSObject
Declared in:
- AppKit/NSHelpManager.h
- AppKit/NSImage.h
- AppKit/NSNibLoading.h
- AppKit/NSSound.h
The Application Kit adds methods to the Foundation Framework's NSBundle class for:
Help.plist
fileThese methods become part of the NSBundle class only for those applications that use the Application Kit.
For information on bundles, see the NSBundle class specification in the Foundation Framework Reference.
- Loading nib files
- + loadNibFile:externalNameTable:withZone:
- + loadNibNamed:owner:
- - loadNibFile:externalNameTable:withZone:
- Locating NSImage resources
- - pathForImageResource:
- Accessing context help
- - contextHelpForKey:
- Locating NSSound resources
- - pathForSoundResource:
+ (BOOL)loadNibFile:(NSString
*)fileName
externalNameTable:(NSDictionary
*)context
withZone:(NSZone *)zone
NSOwner
"
and whose values are existing objects that can be referenced by the
newly unarchived objects. Returns YES upon success, or NO if the
specified nib file couldn't be loaded.This method is declared
in NSNibLoading.h
.
+ (BOOL)loadNibNamed:(NSString
*)aNibName
owner:(id)owner
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.This method
is declared in NSNibLoading.h
.
See Also: + bundleForClass: (NSBundle)
- (NSAttributedString *)contextHelpForKey:(NSString
*)key
nil
if Help.plist
isn't
present or if Help.plist
doesn't
contain an entry for key.When
you build your application, /usr/bin/compileHelp
packages
your help files into a property list named Help.plist
. contextHelpForKey: extracts
context help from this file, but looks it up using the name of the
original help file. For example, if your application project contains
a help file Copy.rtf
, you
can get its text using contextHelpForKey: with
the argument @"Copy.rtf
".
This
method is declared in NSHelpManager.h
.
See Also: - contextHelpForObject: (NSHelpManager)
- (BOOL)loadNibFile:(NSString
*)fileName
externalNameTable:(NSDictionary
*)context
withZone:(NSZone *)zone
.lproj
"
directory; if the nib file isn't there, it looks for a non-localized
resource in the immediate bundle directory. Objects from the nib
file are allocated in the memory zone specified by zone. The context
argument is a name table-a 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, or NO if the specified nib file
couldn't be loaded.This method is declared in NSNibLoading.h
.
- (NSString *)pathForImageResource:(NSString
*)name
nil
if
the specified resource can't be located. Image
resources are those files in the bundle that are recognized by NSImage
without filtering (essentially, a file whose type is one of those
returned by the imageUnfilteredFileTypes method).
The resource name is simply the filename without the path of its bundle
directory; the filename extension is optional.This method
is declared in NSImage.h
.
See Also: - pathForResource:ofType: (NSBundle)
- (NSString *)pathForSoundResource:(NSString *)name;
nil
if
the specified resource can't be located. Sound
resources are those files in the bundle that are recognized by NSSound
without filtering (essentially, a file whose type is one of those
returned by the soundUnfilteredFileTypes method).
The resource name is simply the filename without the path of its bundle
directory; the filename extension is optional.This method
is declared in NSSound.h
.
See Also: - pathForResource:ofType: (NSBundle)