Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

NSTextAttachmentMBS.attributedStringWithAttachment(attachment as NSTextAttachmentMBS) as NSAttributedStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 15.0 Yes No No Yes, macOS only No
Function: Creates an attributed string with an attachment.
Example:
dim content as MemoryBlock = "Hello World"
dim f as NSFileWrapperMBS = NSFileWrapperMBS.initRegularFileWithContents(content)
f.filename = "HelloWorld.txt"

dim a as new NSTextAttachmentMBS(f)
dim s as NSAttributedStringMBS = NSTextAttachmentMBS.attributedStringWithAttachment(a)
Notes: This is a convenience method for creating an attributed string containing an attachment using NSAttachmentCharacter as the base character.

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins