O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSApplication — Mac OS X 10.0

Synopsis

This is one of the three classes that define the overall architecture of the Application Kit, as well as the general behavior of Cocoa applications. The other two classes are NSView and NSResponder. Every AppKit-based application has an instance of NSApplication that is accessible through the global variable NSApp.

image with no caption

@interface NSApplication : NSResponder
                                  // Accessor Methods
   - (void)setMainMenu:(NSMenu *)aMenu;
   - (NSMenu *)mainMenu;
   - (void)setDelegate:(id)anObject;
   - (id)delegate;
   - (void)setWindowsNeedUpdate:(BOOL)needUpdate;
   - (void)setAppleMenu:(NSMenu *)menu;
   - (void)setApplicationIconImage:(NSImage *)image;
   - (NSImage *)applicationIconImage;
   - (void)setWindowsMenu:(NSMenu *)aMenu;
   - (NSMenu *)windowsMenu;
   - (void)setServicesMenu:(NSMenu *)aMenu;
   - (NSMenu *)servicesMenu;
   - (void)setServicesProvider:(id)provider;
   - (id)servicesProvider;
                                  // Class Methods
   + (void)detachDrawingThread:(SEL)selector 
                                 toTarget:(id)target 
                                 withObject:(id)argument;
   + (NSApplication *)sharedApplication;
                                  // Instance Methods
   - (NSModalSession)beginModalSessionForWindow:(NSWindow *)theWindow;
   - (void)activateContextHelpMode:(id)sender;
   - (void)abortModal;
   - (void)activateIgnoringOtherApps:(BOOL)flag;
   - (void)addWindowsItem:(NSWindow *)win 
                                 title:(NSString *)aString 
                                 filename:(BOOL)isFilename;
   - (void)arrangeInFront ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required