This line gives me the error "Generic parameter 'Content' could not be inferred"
@State private var filterStyleEnum = FilteredListBonusRoundView.FilterType.beginsWith
I tried
@State private var filterStyleEnum = FilteredListBonusRoundView.self.FilterType.beginsWith
and
@State private var filterStyleEnum = FilteredListBonusRoundView.FilterType.self.beginsWith
and
@State private var filterStyleEnum = FilteredListBonusRoundView.FilterType.beginsWith.self
and
@State private var filterStyleEnum:FilteredListBonusRoundView.FilterType = .beginsWith
All give the same error.
@State private var filterStyleEnum = FilteredListBonusRoundView<NSManagedObject, View>.FilterType.beginsWith
gives a different error, I didn't think it was going to work but I tried.
My call to the subview works great later in the code
FilteredListBonusRoundView(filterKey: "lastname", filterValue: lastNameFilter, filterType: .beginsWith, sortInstructions: [NSSortDescriptor(keyPath: \Singer.lastname, ascending: true), NSSortDescriptor(keyPath: \Singer.firstname, ascending: true)])
but I can't figure out how to make the enum call update without moving the enum out of the filter list view's struct. I would like to leave the enum inside the subview if possible. I feel like this should work per the swift documentation on nested types
More code here:
https://gist.github.com/carlynorama/a0d45aeb8f63c424671a4a5ed29e0fea
Anyone have any thoughts?
This course is so thoughtfully done, btw! Looking forward HWS+ when I'm done.