Originally the origin of the NSRect was calculated and the screen was part of that calculation so I passed it in. In the end I decided to hard code the values and just forgot to take it out. Good catch.
Post
Replies
Boosts
Views
Activity
I will look at sizing of the tableview. I do not currently attempt to size the scroll view. Your streamlining of the code will be incorporated.
I noticed that occasionally when I selected the button, the table would flash. To eliminate the problem I removed vm.isLoading = true from the button action and added it to the MainActor call in the view model. This stopped the occasional flashing.
With strftime I can get the starting date, ie subtract 1 year from the latest date with substitutions, but I have to have the latest date to do so. Is there a way to include capturing the latest date as part of the query?
Thank you. When adding entities to the managed object context using persistentContainer.performBackgroundTask, do I have to save twice? Save once in the background context which saves it to the parent context and then save in the parent context to push the added entities to persistent stores.
Unable to initial showData with false. Used
@State var showData: [Bool] = []
and in init:
self.showData = Array(repeating: false, count: closingValues.count).
showData is still empty. closingValues.count = 251
Thank you for the input. I corrected the problem by adding code to to my core data manager class init which loads the persistent store. See code below.
let persistentStoreURL: URL = URL(fileURLWithPath: "/Users/Chris/Downloads/Persistent Store/Index Funds.sqlite", isDirectory: false)
let description = NSPersistentStoreDescription(url: persistentStoreURL)
persistentContainer.persistentStoreDescriptions = [description]