Platforms to show: All Mac Windows Linux Cross-Platform

NSPasteboardMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Clipboard MBS MacBase Plugin 10.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The class for the clipboard access on Cocoa.
Example
Var p as new NSPasteboardMBS

MsgBox join(p.types,EndOfLine)

NSPasteboard objects transfer data to and from the pasteboard server. The server is shared by all running applications. It contains data that the user has cut or copied, as well as other data that one application wants to transfer to another. NSPasteboard objects are an application's sole interface to the server and to all pasteboard operations.

An NSPasteboard object is also used to transfer data between applications and service providers listed in each application's Services menu. The drag pasteboard (NSDragPboard) is used to transfer data that is being dragged by the user.

The plugin class NSPasteboardMBS does not implement all features of the NSPasteboard. If you miss something, please email us.

Access Behavior

Constant Value Description
AccessBehaviorAlwaysAllow 2 The system will automatically allow all pasteboard access, without notifying the user. The app is listed in the corresponding System Settings pane.
AccessBehaviorAlwaysDeny 3 The system will automatically deny all pasteboard access, without notifying the user. However, access that is both user originated and paste related will always be allowed, and will not result in a notification. The app is listed in the corresponding System Settings pane.
AccessBehaviorAsk 1 The system will notify the user and ask for permission before granting pasteboard access. However, access that is both user originated and paste related will always be allowed, and will not result in a notification. The app is listed in the corresponding System Settings pane.
AccessBehaviorDefault 0 The default behavior for the General pasteboard is to ask upon programmatic access. All other pasteboards default to always allow access. more

This class has no sub classes.

Blog Entries

Release notes

  • Version 25.3
    • Added new methods to NSPasteboardMBS and NSPasteboardItemMBS classes to handle access behavior.
  • Version 21.4
    • Added SetPasteboardItems method taking array of variants to NSPasteboardMBS class.
  • Version 17.1

Some methods using this class:

Some events using this class:

Some examples using this class:

Some related classes:


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


NSPasteboardItemMBS   -   NSPathComponentCellMBS


The biggest plugin in space...