NSApplication (EDExtensions)


Declared In:
NSApplication+Extensions.h


Category Description

Various useful extensions to NSApplication.


Method Types

- registerFactoryDefaults
- name
- libraryDirectory
- menuItemWithAction:
- menuItemWithAction:inMenu:

Instance Methods

libraryDirectory

- (NSString *)libraryDirectory

Returns the name of the application's library directory. This can be overriden by the user default "LibraryDirectory" as the Windows implemention of the automatic routine can be less than useful. In any case, the library directory is also created if it did not exist before.


menuItemWithAction:

- (NSMenuItem *)menuItemWithAction:(SEL)action

Returns the first menu item in the application's main menu (or any of its submenus) that has the specified action, nil otherwise.


menuItemWithAction:inMenu:

- (NSMenuItem *)menuItemWithAction:(SEL)action inMenu:(NSMenu *)aMenu

Returns the first menu item in aMenu (or any of its submenus) that has the specified action, nil otherwise.


name

- (NSString *)name

Returns the name of the application. This does not come from an info file but directly from NSProcessInfo.


registerFactoryDefaults

- (void)registerFactoryDefaults

Looks for a file called "FactoryDefaults.plist" in the main bundle, assumes it is in property list format and registers its contents as user defaults. If the file is missing or in an unreadable format an exception is raised.


Version 2.0 Copyright ©2002. All Rights Reserved.