NSWorkspaceMBS class

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

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

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


💬 Ask a question or report a problem