Post

Replies

Boosts

Views

Activity

Strange Overlay with NSWorkspace.shared.icon(forFile: )
I am currently experiencing strange behavior when determining icons for files. When I determine icons using let icon = NSWorkspace.shared.icon(forFile: path) it generally works fine. However, for some files, a "denied" symbol appears as an overlay. When I look at the corresponding icon in the debugger, a Decorated-Icon with the decoration "com.apple.icon-decoration.system.unsupported" is determined. In Finder, Dock, or other programs, the symbol is displayed correctly. In the case mentioned, it is a website that has been converted into an app using the "Unite" application. Why is NSWorkspace.shared.icon(forFile: path) determining this overlay and is there a way to get the "normal" icon?
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
572
Oct ’23
SwiftUI: quickLookPreview - called while the panel has no controller?
Hello all, I am trying to use quickLookPreview in SwiftUI (macOS) to view a file using quicklook. The following sample code is actually very simple: import SwiftUI import QuickLook struct ContentView: View {     @State var qlURL: URL?     var body: some View {         Button("Show QuickLook") {             qlURL = URL.init(fileURLWithPath: "path to a file")         }         .quickLookPreview($qlURL)     } } At first glance, everything looks great and the specified file is displayed via quicklook. However, I get numerous error messages in the log: 2023-03-10 14:46:58.258051+0100 SwiftUI-Test1[998:5878590] [General] -[QLPreviewPanel setDelegate:] called while the panel has no controller - Fix this or this will raise soon. See comments in QLPreviewPanel.h for -acceptsPreviewPanelControl:/-beginPreviewPanelControl:/-endPreviewPanelControl:. 2023-03-10 14:46:58.258228+0100 SwiftUI-Test1[998:5878590] [General] -[QLPreviewPanel setDataSource:] called while the panel has no controller - Fix this or this will raise soon. See comments in QLPreviewPanel.h for -acceptsPreviewPanelControl:/-beginPreviewPanelControl:/-endPreviewPanelControl:. 2023-03-10 14:46:58.261948+0100 SwiftUI-Test1[998:5878590] [General] -[QLPreviewPanel reloadData] called while the panel has no controller - Fix this or this will raise soon. See comments in QLPreviewPanel.h for -acceptsPreviewPanelControl:/-beginPreviewPanelControl:/-endPreviewPanelControl:. I'm admittedly a bit lost - how are these messages to be understood and how can they be fixed. Xcode 14.2, macOS 13.2, Target: macOS Thanks! Gerald
2
1
1.6k
Apr ’23
Autoscroll NSOutlineView while dragging?
Does an NSOutlineView have built-in autoscrolling when the mouse is moved to the beginning or end of the NSOutlineView during a drag operation? As plan B I would create a tracking area at the top and bottom and trigger the scrolling while the mouse is over it - but a built-in solution would make more sense if available. Can someone give me a hint here? Thanks!
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
782
Nov ’21
Strange Overlay with NSWorkspace.shared.icon(forFile: )
I am currently experiencing strange behavior when determining icons for files. When I determine icons using let icon = NSWorkspace.shared.icon(forFile: path) it generally works fine. However, for some files, a "denied" symbol appears as an overlay. When I look at the corresponding icon in the debugger, a Decorated-Icon with the decoration "com.apple.icon-decoration.system.unsupported" is determined. In Finder, Dock, or other programs, the symbol is displayed correctly. In the case mentioned, it is a website that has been converted into an app using the "Unite" application. Why is NSWorkspace.shared.icon(forFile: path) determining this overlay and is there a way to get the "normal" icon?
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
1
Boosts
0
Views
572
Activity
Oct ’23
SwiftUI: quickLookPreview - called while the panel has no controller?
Hello all, I am trying to use quickLookPreview in SwiftUI (macOS) to view a file using quicklook. The following sample code is actually very simple: import SwiftUI import QuickLook struct ContentView: View {     @State var qlURL: URL?     var body: some View {         Button("Show QuickLook") {             qlURL = URL.init(fileURLWithPath: "path to a file")         }         .quickLookPreview($qlURL)     } } At first glance, everything looks great and the specified file is displayed via quicklook. However, I get numerous error messages in the log: 2023-03-10 14:46:58.258051+0100 SwiftUI-Test1[998:5878590] [General] -[QLPreviewPanel setDelegate:] called while the panel has no controller - Fix this or this will raise soon. See comments in QLPreviewPanel.h for -acceptsPreviewPanelControl:/-beginPreviewPanelControl:/-endPreviewPanelControl:. 2023-03-10 14:46:58.258228+0100 SwiftUI-Test1[998:5878590] [General] -[QLPreviewPanel setDataSource:] called while the panel has no controller - Fix this or this will raise soon. See comments in QLPreviewPanel.h for -acceptsPreviewPanelControl:/-beginPreviewPanelControl:/-endPreviewPanelControl:. 2023-03-10 14:46:58.261948+0100 SwiftUI-Test1[998:5878590] [General] -[QLPreviewPanel reloadData] called while the panel has no controller - Fix this or this will raise soon. See comments in QLPreviewPanel.h for -acceptsPreviewPanelControl:/-beginPreviewPanelControl:/-endPreviewPanelControl:. I'm admittedly a bit lost - how are these messages to be understood and how can they be fixed. Xcode 14.2, macOS 13.2, Target: macOS Thanks! Gerald
Replies
2
Boosts
1
Views
1.6k
Activity
Apr ’23
Autoscroll NSOutlineView while dragging?
Does an NSOutlineView have built-in autoscrolling when the mouse is moved to the beginning or end of the NSOutlineView during a drag operation? As plan B I would create a tracking area at the top and bottom and trigger the scrolling while the mouse is over it - but a built-in solution would make more sense if available. Can someone give me a hint here? Thanks!
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
1
Boosts
0
Views
782
Activity
Nov ’21