Post

Replies

Boosts

Views

Activity

Comment on SwiftData Component
You could make a DeckList View which would have the @Query var decks: [Deck]. There you could use for example a List and inside the List use your DeckRow with a single Deck as a parameter (the @Query should not be in the DeckRow anymore - replace is with var deck: Deck).
Oct ’23
Comment on SwiftData - What is Best Practice for returning an object from a sheet
"if your list view wanted to use what was the new object created in your list view [...]" Another approach, instead of using a closure, could be to pass a binding to the new object an an optional (@Binding var newObject: NewObjectModel?). In case of "cancel" nothing would be set, so it would still be nil. And the case of save it would be set to the newly created model object and the calling view could react on that (for example with the onChange modifier).
Sep ’23
Comment on @SceneStorage not working on macOS
Still the same behavior, even with waiting. So far all the machines I could reproduce the issue were laptops (MacBooks Pro/Intel/M1/M1 Pro), using the latest macOS, Xcode. Not sure if this is any indicator for anything, but may I ask on which machine you had success? Thank you!
May ’22
Comment on Crash in swift_getObjectType or processDefaultActor when using (nested) async/await with URLSession
Unfortunately this would not help in my case, since the intend (in the original project) of the _failsafe method is to "recover" from generic server errors and send the original request again. (For various reasons the server I am talking to behaves not as the "normal" REST/HTTP server and there is unfortunately no way to change that.) I am wondering now if there's something wrong about how I am using async/await/URLSession (except from being used in a very contrived example ;-)? To me it seems I am using them in a "legal' way, but for obvious reasons I am just starting to use async/await in Swift ;-). Thanks for your help!
Jun ’21