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)
Topic: App & System Services SubTopic: General Tags:
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
Topic: UI Frameworks SubTopic: AppKit Tags:
Nov ’22
Reply to C compiler lies about c11 support
Is there any updates? I still can't find <threads.h> and no STDC_NO_THREADS definition when creating command-line tool using C.
Replies
Boosts
Views
Activity
Jul ’23
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)
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
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
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to NStableView inside a NSpopover doesn't read VoiceOver keyboard navigation hints
Setting the NSPopover's window's accessibilityRole to windows will make VO read the hints, but not work on Catalina and versions before
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
May ’22