Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey

All Questions

Tagged with
0 votes
1 answer
38 views

Override NSManagedObject getter/setter to modify data

I have an NSManagedObject class that stores, among other things, a JSON string that comes from a WkWebView form. The form in the web view allows the user to add images to the form; when the form is ...
Markus's user avatar
  • 2,562
0 votes
1 answer
91 views

NSArrayController 'Add' function now causes saved NSTableView listed entries to temporarily lose focus

I have a few long functioning (Core Data) apps. built on an OSX (10.13.6) machine with an older version of Xcode. I customize an arrayController 'add' method to auto-insert the current date as ...
Paul's user avatar
  • 193
0 votes
0 answers
61 views

More complex filterPredicate for NSArrayController

I am using a NSArrayController which has a Managed Object Context to present data of a CoreData source in a NSTableView. Everything works fine, I can also use filterPredicate to filter my results ...
Mike Nathas's user avatar
  • 1,373
1 vote
1 answer
54 views

Sample Code for MacOS Core Data with external file management with Undo/Redo

I'm trying to create an NSManagedObject subclass that manages a single file external to the Core Data database targeting back to MacOS 10.14. I don't think I can use the in built feature to store ...
Silver's user avatar
  • 11
0 votes
1 answer
64 views

Core Data isn't being reset when I close the calling class - how can I reset it?

This is a question that appears to have been answered many times on Stack Overflow - but still it doesn't work for my use-case. Core Data mostly works fine. The problem comes when closing the ...
headbanger's user avatar
  • 1,102
1 vote
1 answer
895 views

How to merge changes between core data background context and main context in Swift

I've got a MacOS app that imports data from CSV into Core Data. Since it can be a long running process I opted to do the import in a background thread so I can update the UI with the import progress. ...
kanaloa's user avatar
  • 41
0 votes
0 answers
37 views

ViewModel has 0 items on the first few calls from AppDelegate

This is a part of updateStatusData() in my AppDelegate viewModel?.arrayController.arrangedObjects as! [Item] Then I loop through the objects and format them to some string. On the first call from ...
kirqe's user avatar
  • 2,470
0 votes
0 answers
39 views

Best Xcode/cocoa method for displaying an array of inter-dependent data

I am an occaisional cocoa programmer who needs to write an app to display a table of data. I need a push in the right direction so I can avoid blind alleys. Stock data would provide a reasonable ...
user3308886's user avatar
1 vote
1 answer
577 views

iCloud on off button in SwiftUI results in a crash

I've added iCloud into my SwiftUI app and everything seems to be working great, however I need to implement an on off toggle for it. After searching, I found a couple forum posts that suggested to re-...
fuzzyCap's user avatar
  • 409
0 votes
0 answers
34 views

In my macOS app that uses Core Data constraints, setting a binding with the "Validates Immediately" to a NSTextField has no effect. Any clue?

I am developing an Objective-C macOS app that uses Core Data, and I am trying to enforce constraints, specifically a rather common one, to achieve a unique title for my entity. I have tried to follow ...
Alfonso Tesauro's user avatar
0 votes
1 answer
278 views

Swift NSManagedObject Subclass Incorrectly Adds Module Name on 10.13 and Below

Context I'm building an app on macOS Catalina (10.15.6) using Xcode 12. The app uses Core Data. I've let Xcode generate subclasses of my NSManagedObject entities using Swift. Those look like this: // ...
Bryan's user avatar
  • 5,579
2 votes
1 answer
1k views

Swift: @objc(...) Attribute

In Apple-generated code (Core Data NSManagedObject subclasses, for example) I see this: @objc(LPFile) public class LPFile: NSManagedObject { ... } My question is: why is the @objc declaration done ...
Bryan's user avatar
  • 5,579

15 30 50 per page
1
2 3 4 5
117