Post

Replies

Boosts

Views

Activity

Reply to How to update data in a DataFrame
Did not work .... the data table, is creating a dynamic field, based on the contents it is loading: @ViewBuilder func createKeyField(row :DataFrame.Rows.Element, columnName :String) -> some View { let binding = Binding( get: { dbModel.getColumnValue(row :row, columnName :columnName) }, set: { dbModel.setColumnValue(row :row, columnName :columnName, value :$0) } ) TextField("", text: binding) } func setColumnValue(row :DataFrame.Rows.Element, columnName :String, value :String) { data[columnName][row.id] = value } but the value does not get changed
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’24
Reply to Help Loading an External CSV File on iOS in Swift
I was able to load a CSV into a TabularData based SwiftUI app -- loading and displaying was no issue ... but, HOW to update a value in a column. I created a bindable textfield for the columns in the table, and it displays the value for the rows/columns, and while the code to update the column compiles, it never updates the value in the DataFrame. Is a DataFrame read only ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’24
Reply to How to update data in a DataFrame
That's correct - and while using Observables for the model, when I key in the text field, you see the value, but immediately the entire table refreshes.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’24
Reply to How to update data in a DataFrame
Did not work .... the data table, is creating a dynamic field, based on the contents it is loading: @ViewBuilder func createKeyField(row :DataFrame.Rows.Element, columnName :String) -> some View { let binding = Binding( get: { dbModel.getColumnValue(row :row, columnName :columnName) }, set: { dbModel.setColumnValue(row :row, columnName :columnName, value :$0) } ) TextField("", text: binding) } func setColumnValue(row :DataFrame.Rows.Element, columnName :String, value :String) { data[columnName][row.id] = value } but the value does not get changed
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’24
Reply to How to update data in a DataFrame
Thanks Eskimo for this ... I will apply the changes as you outlined !
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’24
Reply to Help Loading an External CSV File on iOS in Swift
I was able to load a CSV into a TabularData based SwiftUI app -- loading and displaying was no issue ... but, HOW to update a value in a column. I created a bindable textfield for the columns in the table, and it displays the value for the rows/columns, and while the code to update the column compiles, it never updates the value in the DataFrame. Is a DataFrame read only ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to CSV File Load Into Swift
Having done this ... how can you update a column in a DataFrame ?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to iTunes Link Maker is gone
https://linkmaker.itunes.apple.com/en-us/language
Replies
Boosts
Views
Activity
Jan ’22