Function

NSApplicationLoad

Startup function to call when running Cocoa code from a Carbon application.

Declaration

BOOL NSApplicationLoad(void);

Return Value

YES if the NSApplication object was successfully initialized and can now be used from your Carbon application or NO if there was an error during initialization.

Discussion

You typically call this function before calling other Cocoa code in a plug-in loaded into a primarily Carbon application. If the shared NSApplication object is not already initialized, this function initializes it and sets up the necessary event handlers for Cocoa.