Platforms to show: All Mac Windows Linux Cross-Platform

Back to FolderItem class.

FolderItem.SetTagNamesMBS(tags() as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS MacCF Plugin 13.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets file tags.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.xojo_binary_project")

dim Tags() as string = Array("Hello", "World")
dim e as Integer = f.SetTagNamesMBS(tags)

MsgBox "SetTagNamesMBS: "+str(e)

tags() is array with new tag names.
Provides error code as return value and details about error in CFErrorMBS object.
Requires Mac OS X 10.9 or newer.
Please note that some tags may include chr(10) followed by a number to indicate which label color is used for compatibility to older OS X versions.

See also:

Some examples using this method:

FolderItem.SetTagNamesMBS(tags() as string, byref e as CFErrorMBS) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS MacCF Plugin 13.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets file tags.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.xojo_binary_project")

dim Tags() as string = Array("Hello", "World")
dim ce as CFErrorMBS
dim e as Integer = f.SetTagNamesMBS(tags, ce)

if ce <> nil then
MsgBox "SetTagNamesMBS: "+str(e)+EndOfLine+ce.Description
else
MsgBox "SetTagNamesMBS: "+str(e)
end if

tags() is array with new tag names.
Provides error code as return value and details about error in CFErrorMBS object.
Requires Mac OS X 10.9 or newer.
Please note that some tags may include chr(10) followed by a number to indicate which label color is used for compatibility to older OS X versions.

See also:

Some examples using this method:

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


The biggest plugin in space...