Hi, thanks for this tutorial about NSTableView in SwiftUI. Would it be possible for you to upload your project that does this successfully? I keep running into errors and crashes on initializing from NSViewControllerRepresentable and makeNSViewController. I am currently getting this when returning from makeNSViewController:
-[NSNib _initWithNibNamed:bundle:options:] could not load the nibName: EntityNSTableViewController in bundle (null).
followed by a EXC_BAD_ACCESS crash when the window is brought to the front.
I build systems to solve difficult problems. Expert in full-stack software development, hardware deployment, and networking computer systems in extreme environments.
Hi Mark, sorry for my slow reply! I have been doing some more work with NSTableView in SwiftUI recently, so it's possible I could smash something together to upload... I have a few macOS apps in the pipe that I might be able to open source. I'll try to do so soon!
I'd also love an example project! I'm learning to build a MacOS app and it's tough to learn aspects of NSTableView concurrently with SwiftUI concepts...
I build systems to solve difficult problems. Expert in full-stack software development, hardware deployment, and networking computer systems in extreme environments.
Yeah NSTableView definitely requires a totally different mindset than SwiftUI. I'd recommend building some stuff in AppKit to get used to the "old" way of doing things. It's so common to need to drop back down into AppKit, and NSViewRepresentable becomes very important. Another example is AuthenticationServices - To add a "Sign in with Apple" button you're back in AppKit land writing @objc interface implementations!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi, thanks for this tutorial about NSTableView in SwiftUI. Would it be possible for you to upload your project that does this successfully? I keep running into errors and crashes on initializing from NSViewControllerRepresentable and makeNSViewController. I am currently getting this when returning from makeNSViewController:
-[NSNib _initWithNibNamed:bundle:options:] could not load the nibName: EntityNSTableViewController in bundle (null).
followed by a EXC_BAD_ACCESS crash when the window is brought to the front.
Hi Mark, sorry for my slow reply! I have been doing some more work with
NSTableView
in SwiftUI recently, so it's possible I could smash something together to upload... I have a few macOS apps in the pipe that I might be able to open source. I'll try to do so soon!I'd also love an example project! I'm learning to build a MacOS app and it's tough to learn aspects of NSTableView concurrently with SwiftUI concepts...
Yeah NSTableView definitely requires a totally different mindset than SwiftUI. I'd recommend building some stuff in AppKit to get used to the "old" way of doing things. It's so common to need to drop back down into AppKit, and NSViewRepresentable becomes very important. Another example is AuthenticationServices - To add a "Sign in with Apple" button you're back in AppKit land writing @objc interface implementations!