Post

Replies

Boosts

Views

Activity

Reply to FileManager displayName(atPath:) no effect?
@eskimo I can reproduce this issue in my swift common-line tool. The main.swift is pasted below. macOS 13.4.1, Xcode Version 14.3.1. import AppKit let paths = NSSearchPathForDirectoriesInDomains(.downloadsDirectory, .userDomainMask, true) if paths.count > 0 { let doc = FileManager().displayName(atPath: paths[0]) print(doc) } The console outputs Downloads Program ended with exit code: 0 But the expected result for displayName(atPath:) should return "下载" for my system‘s localization language (Simplified Chinese)
Jul ’23
Reply to deminiaturize(_:) won't call makeKeyAndOrderFront(_:) synchronously on macOS 13
class MyWindow: NSWindow { ... override open func makeKeyAndOrderFront(_ sender: Any?) { debugPrint("will front\(Float(clock())/Float(CLOCKS_PER_SEC))") super.makeKeyAndOrderFront(sender) debugPrint("fronted\(Float(clock())/Float(CLOCKS_PER_SEC))") } ... override open func deminiaturize(_ sender: Any?) { debugPrint("will deminiaturize\(Float(clock())/Float(CLOCKS_PER_SEC))") super.deminiaturize(sender) debugPrint("deminiaturized\(Float(clock())/Float(CLOCKS_PER_SEC))") } } sorry for pasting wrong codes. Codes updated
Nov ’22