Post

Replies

Boosts

Views

Activity

Reply to NSTextField in toolbar on Big Sur
I managed to add a resizeable NSTextField to NSToolbar with the following code: let item = NSToolbarItem(itemIdentifier: .titleItem) /* Or any other identifier */ let field = NSTextField() /* Do not use one of the new initialisers! */ field.isBordered = false /* This is essential */ field.lineBreakMode = .byTruncatingTail item.view = field
Topic: UI Frameworks SubTopic: AppKit Tags:
Sep ’24
Reply to Xcode 26 Beta 5 XIB Compiler outputs NIBs with dependency on class that isn't available pre-macOS 26
I see the exact same weird class name in a 'purple' warning message when running one of my projects: Attempting to unarchive Swift class 'AppKit.NSScrollPocket.(unknown context at $19bd29ed8).BackdropView' with unstable runtime name '_TtCC6AppKit14NSScrollPocketP33_EC3F85FAB7755D56E669206D2B17725B12BackdropView'. The runtime name for this class may change in the future, leading to non-decodable data. You can use the 'objc' attribute to ensure that the name will not change: "@objc(_TtCC6AppKit14NSScrollPocketP33_EC3F85FAB7755D56E669206D2B17725B12BackdropView)" If there are no existing archives containing this class, you should choose a unique, prefixed name instead: "@objc(ABCMyModel)" The purple error line is on instantiation of a Storyboard. I have no idea which element in the Storyboard is responsible for this warning, which makes it hard to make an example project for a Feedback. Do you see the same kind of warning or something completely different?
Aug ’25
Reply to Xcode 26 Beta 5 XIB Compiler outputs NIBs with dependency on class that isn't available pre-macOS 26
The runtime warning (not error) I see, seems indeed to be caused by one or more NIBs that contains the infamous _TtCC6AppKit14NSScrollPocketP33_EC3F85FAB7755D56E669206D2B17725B12BackdropView class reference. Compiled storyboards results in a collection of NIBs, and I saw a few that contains each 2 references to said weird class. After removing the NSTouchBar objects from the storyboard, the resulting NIBs only contained 1 reference, without causing a runtime warning. If Apple doesn't solve this runtime warning then I think I just ignore it until it's solved or when I can give up support for NSTouchBar.
Aug ’25