Post

Replies

Boosts

Views

Activity

Comment on confirmationDialog crashes with Button.init(action, @ViewBuilder label)
I did see that, but I don't automatically have a good idea of what it means. I'm used to declarative UI libraries like Cocoa and Delphi, where the views would be represented by objects of a class, and have a property "label" or "text" or whatever. The code for confirmation dialog could read that, but in SwiftUI, as we have here, the Button is a black box, so it is not clear how it can read the label string. It's a hidden requirement. Grrrr. I hate those.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’23
Comment on Error after adding previewContainer during code-along
Hey, Developer Tools Engineer, Julia is an excellent presenter! If you see her, could you please correct her pronunciation of "model"? She makes it sound like "modal", which was a bit distracting. And give her a thumbs up for her good teaching style.
Replies
Boosts
Views
Activity
Jun ’23
Comment on confirmationDialog crashes with Button.init(action, @ViewBuilder label)
I did see that, but I don't automatically have a good idea of what it means. I'm used to declarative UI libraries like Cocoa and Delphi, where the views would be represented by objects of a class, and have a property "label" or "text" or whatever. The code for confirmation dialog could read that, but in SwiftUI, as we have here, the Button is a black box, so it is not clear how it can read the label string. It's a hidden requirement. Grrrr. I hate those.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’23
Comment on "Can't find keyplane that supports type 8 for keyboard"?
I am on Xcode 14.3, the app is now called "Simulator", the top-level menu option is now I/O, but whether Connect Hardware Keyboard is on or not, I get the Keyplane error. It is incumbent on Apple to fix this. I prefer my output pane to be clean.
Replies
Boosts
Views
Activity
Apr ’23
Comment on Why does a let variable work in for ... in but not while let ... ?
You asked "Where does the for loop mutate threeToGo?" The for loop will have to call threeToGo.next(), which is a mutating func. func next() is the declaration required by IteratorProtocol to allow it to provide the values in a for loop.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on Why does a let variable work in for ... in but not while let ... ?
The question is: Why does a let work in the for loop? It is still having to call next(). That is what makes it IteratorProtocol, and thus allowed to be used in a for loop.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on Why does a let variable work in for ... in but not while let ... ?
That is right. I was thinking the code in the for loop would also regard the expression after "for i in" as a let value.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on In SwiftUI how to ask user to save edits when dismissing a NavigationLink
But there you are adding a new Back button. I see that as a Cancel button. I wanted to insert an alert to say "Changes will be lost if you quit without saving Quit | Stay", or something like that. I am thinking I will avoid using the default NavigationLink behaviour and add my own buttons, as you are suggesting.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’22
Comment on In SwiftUI, any way to intercept each character entered in a TextField?
I don't know about that one.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22
Comment on In SwiftUI, any way to intercept each character entered in a TextField?
I tried this out more recently and it works now.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21