Platforms to show: All Mac Windows Linux Cross-Platform

NSWorkspaceMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa MBS MacCocoa Plugin 8.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
An NSWorkspace object responds to application requests to perform a variety of services.
Example
// get icon image
dim n as NSImageMBS = NSWorkspaceMBS.iconForFile(SpecialFolder.desktop)
// set the size we want
n.setSize 512,512
// make a copy as picture
Backdrop = n.CopyPictureWithMask

  • Opening, manipulating, and obtaining information about files and devices
  • Tracking changes to the file system, devices, and the user database
  • Launching applications

Constants

Constant Value Description
NSExclude10_4ElementsIconCreationOption 4 One of the possible constants you can use with SetIcon.
NSExcludeQuickDrawElementsIconCreationOption 2 One of the possible constants you can use with SetIcon.
NSWorkspaceLaunchAndHide &h00100000 One of the constants for the launch functions.
NSWorkspaceLaunchAndHideOthers &h00200000 One of the constants for the launch functions.
NSWorkspaceLaunchAndPrint 2 One of the constants for the launch functions.
NSWorkspaceLaunchAsync &h00010000 One of the constants for the launch functions.
NSWorkspaceLaunchDefault &h00010000 One of the constants for the launch functions.
NSWorkspaceLaunchInhibitingBackgroundOnly &h00000080 One of the constants for the launch functions.
NSWorkspaceLaunchNewInstance &h00080000 One of the constants for the launch functions.
NSWorkspaceLaunchWithErrorPresentation &h00000040 One of the constants for the launch functions.
NSWorkspaceLaunchWithoutActivation &h00000200 One of the constants for the launch functions.
NSWorkspaceLaunchWithoutAddingToRecents &h00000100 One of the constants for the launch functions.

Architectures

Constant Value Description
NSBundleExecutableArchitectureARM64 &h0100000c Specifies the 64-bit ARM architecture.
NSBundleExecutableArchitectureI386 &h00000007 Intel 32 bit.
NSBundleExecutableArchitecturePPC &h00000012 PPC 32 bit.
NSBundleExecutableArchitecturePPC64 &h01000012 PPC 64 bit.
NSBundleExecutableArchitectureX86_64 &h01000007 Intel 64 bit.

Authorization Types

Constant Value Description
NSWorkspaceAuthorizationTypeCreateSymbolicLink 0 Authorization for the app to create a symoblic link.
NSWorkspaceAuthorizationTypeReplaceFile 2 Authorization for the app to perform an atomic file write without changing the target file's permissions.
NSWorkspaceAuthorizationTypeSetAttributes 1 Authorization for the app to change specific file attributes.

This class has no sub classes.

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes


The items on this page are in the following plugins: MBS MacCocoa Plugin.


NSWorkspaceAuthorizationMBS   -   NSXPCConnectionMBS


The biggest plugin in space...