Post

Replies

Boosts

Views

Activity

Reply to Getting clicked item index in NSPathControl with pathItems instead of pathComponentCells
Find below my sample code that shows how it's impossible to associate any custom data with a path item. PathControl.pathItems.didSet is called only once when explicitly setting them in loadView(), and in the action selectPath(_:) the path items are not of my custom subclass PathControlItem but are again NSPathControlItem. They change their address on every click, and finding the clicked path item in the pathItems array always returns nil even if by comparing the logged addresses it appears to be there. class ViewController: NSViewController { override func loadView() { let pathControl = PathControl() pathControl.action = #selector(selectPath(_:)) pathControl.pathItems = ["a", "b", "c"].map({ title in let item = PathControlItem() item.title = title item.customData = title return item }) view = NSStackView(views: [pathControl]) } @IBAction func selectPath(_ sender: NSPathControl) { print("click", sender.clickedPathItem!.description, (sender.clickedPathItem as? PathControlItem)?.customData, sender.pathItems.description, sender.pathItems.firstIndex(of: sender.clickedPathItem!), sender.pathItems.firstIndex(where: { $0.description == sender.clickedPathItem!.description })) } } class PathControl: NSPathControl { override var pathItems: [NSPathControlItem] { didSet { print("didSet", pathItems) } } } class PathControlItem: NSPathControlItem { var customData = "" }
Topic: UI Frameworks SubTopic: AppKit Tags:
Feb ’23
Reply to Getting clicked item index in NSPathControl with pathItems instead of pathComponentCells
The documentation in the header file for NSPathControlItem also states: "NSPathControlItem should not be subclassed." I tried doing so nonetheless, but sender.clickedPathItem as! MyPathControlItem fails with the error Could not cast value of type 'NSPathControlItem' (0x20ae78870) to 'MyPathControlItem' (0x1005c0688). So it seems like any custom subclass is replaced again with NSPathControlItem.
Topic: UI Frameworks SubTopic: AppKit Tags:
Feb ’23
Reply to How to test a Mac App on older versions of Mac OS X?
I asked the same exact thing in Feedback Assistant 4 years ago, and they told me that they have no plans on making old macOS installers available. Apparently they have no interest in allowing developers to support older macOS systems, which, assuming that their main interest is maximizing profit from Mac sales by pushing people to abandon old Macs that don't support the software they need anymore, totally makes sense.
Oct ’22
Reply to Xcode 14 and supporting macOS 10.9 - 10.12
I was wondering about the same thing. The release notes for Xcode 14 say only macOS 10.13 and newer are supported, but running all my projects that have deployment target macOS 10.10 works fine. Except for one of them, the only one which has a dependency installed with Swift Package Manager, which now complains that the dependency, which got its last commit over 1 year ago, only supports macOS 10.13 and newer (this was working fine with Xcode 13).
Sep ’22
Reply to Debug Finder sync extension waiting to attach
When running my FinderSync target in Xcode, in the debug navigator it reads "Waiting to attach". I have to manually select "Debug > Attach to Process > My FinderSync target" (listed at the top under Likely Targets). I don't understand how Apple never cared to comment on this issue, which could easily be avoided by improving Xcode, and chose to let us find this out by ourselves.
Topic: UI Frameworks SubTopic: AppKit Tags:
Aug ’22
Reply to macOS 11 beta created an Update partition that is still there after installing the official release
I think it's extremely sad that nobody at Apple wants to help me out here. Is it intended that we install official things that leave garbage around and not even the developers are keen to point out what it is, or to show that they even care about what happens to our machines after installing their software? (Yes, I submitted a bug report 1.5 years ago, in June 2020, obviously without response.)
Topic: App & System Services SubTopic: Core OS Tags:
Dec ’21
Reply to Why does Apple not mark solved bugs as solved?
I've already filed a bug report months or years ago, I don't remember exactly, but never got a response. Why should it be up to us to keep track of what's solved and what not? After all, for some of them I get a response asking to verify if it still happens in the newest OS release, so they have a mechanism for tracking what they are working on. I don't know about you, but checking regularly if any of the thousands of bug reports that I filed have been solved would take many days (I actually did this last January, during the holidays). I would have thought that since we're helping them in finding bugs in their products it shouldn't be our burden to keep checking them. How inefficient that would be!
Nov ’21
Reply to Appstore texts and screenshots localization not working
Could you post the URLs that you're using to see the respective App Stores?
Replies
Boosts
Views
Activity
Apr ’23
Reply to Getting clicked item index in NSPathControl with pathItems instead of pathComponentCells
Find below my sample code that shows how it's impossible to associate any custom data with a path item. PathControl.pathItems.didSet is called only once when explicitly setting them in loadView(), and in the action selectPath(_:) the path items are not of my custom subclass PathControlItem but are again NSPathControlItem. They change their address on every click, and finding the clicked path item in the pathItems array always returns nil even if by comparing the logged addresses it appears to be there. class ViewController: NSViewController { override func loadView() { let pathControl = PathControl() pathControl.action = #selector(selectPath(_:)) pathControl.pathItems = ["a", "b", "c"].map({ title in let item = PathControlItem() item.title = title item.customData = title return item }) view = NSStackView(views: [pathControl]) } @IBAction func selectPath(_ sender: NSPathControl) { print("click", sender.clickedPathItem!.description, (sender.clickedPathItem as? PathControlItem)?.customData, sender.pathItems.description, sender.pathItems.firstIndex(of: sender.clickedPathItem!), sender.pathItems.firstIndex(where: { $0.description == sender.clickedPathItem!.description })) } } class PathControl: NSPathControl { override var pathItems: [NSPathControlItem] { didSet { print("didSet", pathItems) } } } class PathControlItem: NSPathControlItem { var customData = "" }
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Feb ’23
Reply to Getting clicked item index in NSPathControl with pathItems instead of pathComponentCells
The documentation in the header file for NSPathControlItem also states: "NSPathControlItem should not be subclassed." I tried doing so nonetheless, but sender.clickedPathItem as! MyPathControlItem fails with the error Could not cast value of type 'NSPathControlItem' (0x20ae78870) to 'MyPathControlItem' (0x1005c0688). So it seems like any custom subclass is replaced again with NSPathControlItem.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Feb ’23
Reply to FileManager.unmountVolume(at:) logs error "attempt to post distributed notification 'com.apple.unmountassistant.process.start' thwarted by sandboxing."
Yes, on the Mac in a sandboxed app. It succeeds.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’23
Reply to WARNING: Application performed a reentrant operation in its NSTableView delegate. This warning will become an assert in the future.
I'm experiencing the same warning when using a NSOutlineView without SwiftUI, but only a few rows. I opened a new topic here.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’23
Reply to How to test a Mac App on older versions of Mac OS X?
I asked the same exact thing in Feedback Assistant 4 years ago, and they told me that they have no plans on making old macOS installers available. Apparently they have no interest in allowing developers to support older macOS systems, which, assuming that their main interest is maximizing profit from Mac sales by pushing people to abandon old Macs that don't support the software they need anymore, totally makes sense.
Replies
Boosts
Views
Activity
Oct ’22
Reply to Xcode 14 and supporting macOS 10.9 - 10.12
I was wondering about the same thing. The release notes for Xcode 14 say only macOS 10.13 and newer are supported, but running all my projects that have deployment target macOS 10.10 works fine. Except for one of them, the only one which has a dependency installed with Swift Package Manager, which now complains that the dependency, which got its last commit over 1 year ago, only supports macOS 10.13 and newer (this was working fine with Xcode 13).
Replies
Boosts
Views
Activity
Sep ’22
Reply to Debug Finder sync extension waiting to attach
When running my FinderSync target in Xcode, in the debug navigator it reads "Waiting to attach". I have to manually select "Debug > Attach to Process > My FinderSync target" (listed at the top under Likely Targets). I don't understand how Apple never cared to comment on this issue, which could easily be avoided by improving Xcode, and chose to let us find this out by ourselves.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to Trying to print NSAttributedString via many UITextViews causes crash
Thank you for the workaround. Yes, this issue was solved, according to the message I got in Feedback Assistant, with iOS 14.5.1.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to Xcode won't build for universal binary
I'm having the same issue, only that I'm using $(ARCHS_STANDARD). lipo -archs only returns x86_64 and Xcode only shows the option to run the project with My Mac (Rosetta), where all my other projects can also be run on Mac and have the same architectures set.
Replies
Boosts
Views
Activity
Jul ’22
Reply to Store Swift closures and cast them back to their original type
Well, I quickly discarded that idea since as far as I know there's no way of checking at compile-time that a selector has a specific signature.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Swift Playgrounds on iPad: How to add source files properly?
I’m experiencing the same issue. It’s sad that no one at Apple feels the need to give us more information about this issue.
Replies
Boosts
Views
Activity
Jan ’22
Reply to I cannot delete old macOS installers, not even from the Terminal
I think it's extremely sad that nobody at Apple wants to help me out here. Is it intended that we download official installers that cannot be deleted anymore?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to macOS 11 beta created an Update partition that is still there after installing the official release
I think it's extremely sad that nobody at Apple wants to help me out here. Is it intended that we install official things that leave garbage around and not even the developers are keen to point out what it is, or to show that they even care about what happens to our machines after installing their software? (Yes, I submitted a bug report 1.5 years ago, in June 2020, obviously without response.)
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Why does Apple not mark solved bugs as solved?
I've already filed a bug report months or years ago, I don't remember exactly, but never got a response. Why should it be up to us to keep track of what's solved and what not? After all, for some of them I get a response asking to verify if it still happens in the newest OS release, so they have a mechanism for tracking what they are working on. I don't know about you, but checking regularly if any of the thousands of bug reports that I filed have been solved would take many days (I actually did this last January, during the holidays). I would have thought that since we're helping them in finding bugs in their products it shouldn't be our burden to keep checking them. How inefficient that would be!
Replies
Boosts
Views
Activity
Nov ’21