 		NSLocalizedString("layout12", comment: "Layout (v12+)"),
 		NSLocalizedString("customFunction", comment: "Custom Function"),
 		NSLocalizedString("valueList", comment: "Value List"),
-		NSLocalizedString("theme", comment: "Theme")
+		NSLocalizedString("theme", comment: "Theme"),
 	]
 
 	func applicationDidFinishLaunching(_ aNotification: Notification) {

		do {
			if let path = filePath {
				let xmlStr = try String(contentsOfFile: path, encoding: String.Encoding.utf8)
				if let ostype = detectOstypeFromXmlStr(xmlStr) {
					let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassOSType, ostype as CFString, kUTTypeData)?.takeRetainedValue()
					if var type = uti as String? {
						if type == "dyn.ah62d4rv4gk8u" {
							// for theme
							type = "dyn.agk8u"
						}
						pasteboard.declareTypes([NSPasteboard.PasteboardType(rawValue: type)], owner: nil)
						if pasteboard.setString(xmlStr as String, forType: NSPasteboard.PasteboardType(rawValue: type)) {
							if let idx = types.index(of: ostype) {
								showMsg(String(format: NSLocalizedString("copiedToClipboard", comment: "%s definition copied to the clipboard."), typeLabels[idx]))
							}
						} else {
							showMsg(NSLocalizedString("failedToSetClipboard", comment: "Failed to update the clipboard."))
						}
					}
				}
			}

	let lastAltPath = "lastAltPath"
	let prettyPrintXml = "prettyPrintXml"

	let types = [
		"dyn.ah62d4rv4gk8zuxnykk", // tables (XMTB)
		"dyn.ah62d4rv4gk8zuxngku", // fields (XMFD)
		"dyn.ah62d4rv4gk8zuxnxkq", // scripts (XMSC)
		"dyn.ah62d4rv4gk8zuxnxnq", // script steps (XMSS)
		"dyn.ah62d4rv4gk8zuxnqm6", // layout objects (XMLO)
		"dyn.ah62d4rv4gk8zuxnqgk", // layout objects v12+ (XML2)
		"dyn.ah62d4rv4gk8zuxngm2", // custom functions (XMFN)
		"dyn.ah62d4rv4gk8zuxn0mu", // value lists (XMVL)
		"dyn.agk8u", // themes (empty)
	]
	let typeLabels = [
		NSLocalizedString("table", comment: "Table"),
		NSLocalizedString("field", comment: "Field"),
