You are browsing as a guest. Sign up (or log in) to start making projects!

7h 47m 2s logged

Hi, been a while since the last one
mostly struggling to do idiomatic swift/swiftUI error handling :<
anyways……

Singletons are (allegedly) bad

idk why (ig for testing or something) but i found out Singletons are an anti-pattern so i removed them in favor of just using @Observable and @Environment the way it’s done rn is kinda dumb but “will fix later”™

Throwing Errors

I’ve added proper error handling for once, everyone online seemed to recommend you create your own custom error type and i did that with the new FlaskError enum and made all functions which should throw (and not just print a stupid message to the console :-< ) throw a FlaskError
still i need to hook it up to the UI which is more easier said then done, i have no clue what is the cleanest way to do that in SwiftUI and am kinda just freestyling it rn and I know it still looks ugly rn cuz still prototyping

(Sub)process

yeah so i wanted to they async/await on the processes i was spawning (e.g: to get wine version, to make wine prefix, to run a program in wine prefix, etc) but learned you have to make an extension to the Process class so i just used the cross platform newer first-party Subprocess library instead, probably for the best anyways

0
10

Comments 0

No comments yet. Be the first!