Post

Replies

Boosts

Views

Activity

Comment on Checking the contents of a TextField variable method not working
Thank you for your reply. Your suggestion clears the error and I now see my syntax mistake. Unfortunately it does not work (no change if a type error is included in the Text Field). I will study the Code and hopefully the answer will come. Regarding which line the error occurs? unfortunately Playgrounds shows the alert at the top of an enclosure (Section { ) (for example).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’25
Comment on Checking the contents of a TextField variable method not working
I have global error trap that catches “000.000000” which is why I chose “000.000000” as the result of this error trap. I have also taken onboard your suggestion of checking “-“ is not anywhere except at the first position. Regarding which line the error occurs? unfortunately Playgrounds shows the alert at the top of an enclosure (Section { ) (for example).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’25
Comment on Is this bad practice?
So sorry if you thought my comment was directed to you (it wasn’t). Again sorry I didn’t answer the extension question of yours as I was so confused I didn’t realise it was for me. My question is, is it bad practice to take a piece of code and break it up into chunks and format it down one line and also a supplementary question, if code was presented like that, would it compile okay and be acceptable to the App Store for example. Apologies again.
Topic: Programming Languages SubTopic: Swift Tags:
Feb ’23
Comment on .replacingOccurrences(of: "\"", with: "") not working
Tested the above and agree your example works but when applied to a TextField situation i.e. a stray “ or text enclosed in quotes “example text” the quotes are removed. let removeCommasFirstCardFirstWordClue = cards.firstCardFirstWordClue.replacingOccurrences(of: ",", with: "") works in the TextField but, let removeCommasFirstCardFirstWordClue = cards.firstCardFirstWordClue.replacingOccurrences(of: """, with: "") does not work. Maybe I need to find a way to prevent quotes from being entered?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’23