Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSPasteboardItemMBS class.
NSPasteboardItemMBS.availableTypeFromArray(types() as string) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Clipboard | MBS MacBase Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
types: An array of strings representing UTIs, arranged in order of preference (most preferred as the 0th element in the array).
Returns the first (according to the sender's ordering of types) type in types contained in the pasteboard item, or nil if the receiver does not contain any types given in types.
The method checks for UTI conformance of the requested types, preferring an exact match to conformance.
Available in OS X v10.6 and later.
Some examples using this method:
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV Database with DataSource
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV Simple Demo with DataSource
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV TableView
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListboxTV with ContainerControl Cells
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Hierarchical & Flat/ListBoxTV OutlineView
NSPasteboardItemMBS.Constructor
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Clipboard | MBS MacBase Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
NSPasteboardItemMBS.dataForType(type as string) as memoryblock
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Clipboard | MBS MacBase Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
(Read and Write computed property)
NSPasteboardItemMBS.Destructor
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Clipboard | MBS MacBase Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
NSPasteboardItemMBS.detectMetadata(types() as String, theDelegate as NSPasteboardMBS.detectValuesCompletedMBS, tag as variant = nil)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Clipboard | MBS MacBase Plugin | 25.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Because this method only gives access to limited types of metadata and doesn’t allow the app to access the contents, the system doesn’t notify the user about reading the contents of the pasteboard.
For details about the metadata returned for each type.
types: The metadata types to detect on the pasteboard item.
theDelegate: A delegate that the system invokes after detecting metadata on the pasteboard item. The delegate receives either a dictionary with the metadata types found on the pasteboard item or an error if detection failed. The dictionary keys specify the matched metadata types, and the values specify the corresponding metadata.
tag: a value passed on to the delegate.
Requires macOS 15.4 or newer.
NSPasteboardItemMBS.detectPatterns(patterns() as String, theDelegate as NSPasteboardMBS.detectPatternsCompletedMBS, tag as variant = nil)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Clipboard | MBS MacBase Plugin | 25.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Because this method only gives an indication of whether a pasteboard item matches a particular pattern and doesn’t allow the app to access the contents, the system doesn’t notify the user about reading the contents of the pasteboard.
patterns: The patterns to detect on the pasteboard item.
theDelegate: A delegate that the system invokes after detecting patterns on the pasteboard item. The delegate receives either a set with the patterns found on the pasteboard item or an error if detection failed.
tag: a value passed on to the delegate.
Requires macOS 15.4 or newer.
NSPasteboardItemMBS.detectValues(patterns() as String, theDelegate as NSPasteboardMBS.detectValuesCompletedMBS, tag as variant = nil)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Clipboard | MBS MacBase Plugin | 25.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Important: Calling this method notifies the user that the app has read the contents of the pasteboard, if a match is found.
For details about the types returned for each pattern, see shared methods.
patterns: The patterns to detect on the pasteboard item.
theDelegate: A delegate that the system invokes after detecting patterns on the pasteboard item. The delegate returns either dictionary with the patterns found on the pasteboard item or an error if detection failed. The dictionary keys specify the matched patterns, and the values specify the corresponding content of the pasteboard.
tag: a value passed on to the delegate.
Requires macOS 15.4 or newer.
NSPasteboardItemMBS.propertyListForType(type as string) as Variant
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Clipboard | MBS MacBase Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Stores a property list object (array, dictionary, string, numbers, memoryblocks)
Available in OS X v10.6 and later.
(Read and Write computed property)
NSPasteboardItemMBS.setDataProviderForType(dataProvider as NSPasteboardItemDataProviderMBS, types() as string) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Clipboard | MBS MacBase Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
dataProvider: A pasteboard data provider.
types: An array of strings indicating the UTIs for the data representations dataProvider may provide.
Returns true if the data provider was set successfully, otherwise false.
This method registers the data provider to be messaged to provide the data for any of the specified types when requested.
Available in OS X v10.6 and later.
Some examples using this method:
NSPasteboardItemMBS.stringForType(type as string) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | Clipboard | MBS MacBase Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
type: A UTI type string.
Available in OS X v10.6 and later.
(Read and Write computed property)
NSPasteboardItemMBS.types as string()
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Clipboard | MBS MacBase Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Available in OS X v10.6 and later.
The items on this page are in the following plugins: MBS MacBase Plugin.