Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

NSWorkspaceMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Cocoa MBS MacCocoa Plugin 8.1 Yes No No Yes, macOS only No
Function: 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
Notes:
  • Opening, manipulating, and obtaining information about files and devices
  • Tracking changes to the file system, devices, and the user database
  • Launching applications

Feedback, Comments & Corrections

CPU Architecture constants.

Constant Value Description
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 which use this class:

Blog Entries


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


NSWindowRestoreHandlerMBS   -   NSXPCConnectionMBS




Links
MBS Xojo blog