Post

Replies

Boosts

Views

Activity

SwiftData multiple loop entries not inserting
For an array only the last row is inserted where print shows the loop is processed for index in 0..<model.dataTable!.rows.count { let row = model.dataTable!.rows[index] catagory.name = row["Catagory"] as! String context.insert(catagory) print(catagory.name) } tried a forced try?save() which didn't help Thanks Joel
3
0
249
Aug ’24
NavigationLink/Picker
I have a form container with a Navigation Stack at the top level. In a section I have a Navigation link followed by Picker(s) . On its own the navigation link works correctly but when a HStack with Text and Picker is added the navlink breaks . When the link is selected the picker list is presented. It seems others have had this issue which is usually solved by adding the NavigationStack , which is already at the top level. Any guidance is appreciated ( or work around - I added a section between the link and picker but that didn't help ) Joel
7
0
334
Jul ’24