Everything you said is true. However, if you look at my first comment, I already did as you said. Are you sure you read what I wrote and examined the code block carefully?
Post
Replies
Boosts
Views
Activity
Thank you for your answer. But that's not working :(
That's working if I select brand, then I select none. But I'm getting same error if I change the brand.
Yes, I know. I have to set the modelIndex to 0. When I set this value, the picker first gets previous value (3) after gets 0. As I said in the top. And I'm getting error.
Thank you so much again :)
Thank you for you answer. So I have one last question left. I have view which is using only functions in view model. So not using the published value. Should I use it (@Environment(Viewmodel.self) var vm) or should I use var vm = viewModel() like that?
Thank you so much @Timo2303 :)
Thank you very much for your reply. I want the user to enter only 5 prices. I forgot to mention above that if the user wants to enter prices himself, I want to synchronise these prices with iCloud. Can I synchronise UserDefaults? @Claude31
I am constantly trying to improve myself by helping people in the forum. I would be very appreciated if you share how you find my comment as a DTS Engineer :)
The code blocks are a bit complicated and I did not share a code example because I thought I would reach the solution from the idea you would give. Thank you very much for your response, thanks to the idea you gave, it is now completely working :) I have one more question that I did not get an answer, if you want to check it, I would be very grateful. Thank you very much for your time.
Thank you very much for your response :)
Thank you for your response. As you mentioned, this is a test code. However, I don't understand why my model is non-standard. I know that my code as it is will never destroy the ItemDetail model. For this I put @Relationship(deleteRule: .cascade) inside the Item model and this solves my problem. And I still haven't found a solution for my problem, thank you.
Thank you for your response, I understand the point you are trying to make, but I still haven't found the solution to my problem :)