Hello, everyone. I am having some troubles fixing up a UI in a mac app of mine, that just looks horrible for my liking, seeing as I was able to get closer to the interface I wanted with GTK than SwiftUI.
When I go looking through the docs, I see that I can get 2 of the three specific types of columns I need, which are as follows:
1 column where cells are date pickers
1 column with check boxes
1 column with a combo box
As this application is supposed to be a checkbook ledger app that can import data from QIF and JSON, and has been registered in a way that users can import data on iOS directly via Air Drop, there will be a column that cannot be edited, but all other fields are editable, with the combo box column allowing users to enter in a new category type or selecting an existing category.
However, my problem right now is when I go to implement either or the two easiest columns to think about, I cannot seem to access the value I need because the closure, which looks like this:
TableColumn("Date", value: \Record.event.date) { record in
DatePicker("", selection: $record.event.date, displayedComponents: [ .date])
}
Says that record is not found in scope, but seeing as the record variable is supposed to refer to RowValue, according to this and many of the other initializers for a column with dates, I should not be getting this error.
When I actually go about to supply a closure for the content argument, the autocompletion in XCode gives me an underscore, which makes it difficult to create a binding because I have no way to access the date.
How should I go about fixing this?
2
0
1.8k