Up

NSWorkspace

Authors

Scott Christley (scottc@net-community.com)
Richard Frith-Macdonald (richard@brainstorm.co.uk)
Fred Kiefer (FredKiefer@gmx.de)
Workspace class

Copyright: (C) 1996-2016 Free Software Foundation, Inc.

Software documentation for the NSWorkspace(GNUstep) category

NSWorkspace(GNUstep)

Declared in:
AppKit/NSWorkspace.h
Availability: Not in OpenStep/MacOS-X

Description forthcoming.
Method summary

appIconForApp: 

- (NSImage*) appIconForApp: (NSString*)appName;
Availability: Not in OpenStep/MacOS-X

Returns the application icon for the given app. Or null if none defined or appName is not a valid application name.

bundleForApp: 

- (NSBundle*) bundleForApp: (NSString*)appName;
Availability: Not in OpenStep/MacOS-X

Returns the application bundle for the named application. Accepts either a full path to an app or just the name. The extension (.app,.debug, .profile) is optional, but if provided it will be used.
Returns nil if the specified app does not exist as requested.

getBestAppInRole: forExtension: 

- (NSString*) getBestAppInRole: (NSString*)role forExtension: (NSString*)ext;
Availability: Not in OpenStep/MacOS-X

Returns the 'best' application to open a file with the specified extension using the given role . If the role is nil then apps which can edit are preferred but viewers are also acceptable. Uses a user preferred app or picks any good match.

getBestAppInRole: forScheme: 

- (NSString*) getBestAppInRole: (NSString*)role forScheme: (NSString*)scheme;
Availability: Not in OpenStep/MacOS-X

Returns the 'best' application to open a file with the specified URL scheme using the given role. If the role is nil then apps which can edit are preferred but viewers are also acceptable. Uses a user preferred app or picks any good match.

getBestIconForExtension: 

- (NSString*) getBestIconForExtension: (NSString*)ext;
Availability: Not in OpenStep/MacOS-X

Returns the path set for the icon matching the image by -setBestIcon:forExtension:

infoForExtension: 

- (NSDictionary*) infoForExtension: (NSString*)ext;
Availability: Not in OpenStep/MacOS-X

Gets the applications cache (generated by the make_services tool) and looks up the special entry that contains a dictionary of all file extensions recognised by GNUstep applications. Then finds the dictionary of applications that can handle our file and returns it.

infoForScheme: 

- (NSDictionary*) infoForScheme: (NSString*)scheme;
Availability: Not in OpenStep/MacOS-X

Gets the applications cache (generated by the make_services tool) and looks up the special entry that contains a dictionary of all URL schemes recognised by GNUstep applications. Then finds the dictionary of applications that can handle our scheme and returns it.

locateApplicationBinary: 

- (NSString*) locateApplicationBinary: (NSString*)appName;
Availability: Not in OpenStep/MacOS-X

Requires the path to an application wrapper as an argument, and returns the full path to the executable.

setBestApp: inRole: forExtension: 

- (void) setBestApp: (NSString*)appName inRole: (NSString*)role forExtension: (NSString*)ext;
Availability: Not in OpenStep/MacOS-X

Sets up a user preference for which app should be used to open files of the specified extension.

setBestApp: inRole: forScheme: 

- (void) setBestApp: (NSString*)appName inRole: (NSString*)role forScheme: (NSString*)scheme;
Availability: Not in OpenStep/MacOS-X

Sets up a user preference for which app should be used to open files of the specified URL scheme

setBestIcon: forExtension: 

- (void) setBestIcon: (NSString*)iconPath forExtension: (NSString*)ext;
Availability: Not in OpenStep/MacOS-X

Sets up a user preference for which icon should be used to represent the specified file extension.


Up