I posted a bug report as well as a post on this forum. And got some feedback from Frameworks Engineer here: https://developer.apple.com/forums/thread/688144 Let's hope it's corrected soon.
So you can see it for yourself if you download it.: I trust what you said. But it is no help, only some source code would allow to understand, as it is something in the project (I just tried a navigation controller in a brand new project and it worked fine.). Did you build some extensions for buttons ?
I did mark my post for watching, and did not receive any notification of your answer. I filed a bug report Aug 17, 2021 at 10:49 PM – FB9525818. Did you too ?
the () is at the end of the closure, to tell the closure to execute and return result, which initialise the var. If you write only var controller: NSWindowController? = { … } the var is a closure, not NSWindowController. With () at the end, closure executes and returns the expected NSWindowController.
Note that your code should not crash, whatever input user does. You have to make it more robust. May be the reason is you are converting to Float, something like let value = Float(textField.text!) If so, you should instead test for nil with: let value = Float(textField.text!) ?? 0.0
No, normally it is the order in the storyboard that matters. If you move Red View higher in list, it will appear below Green. Even if there is no IBOutlet created, just the views in IB.
I posted a bug report as well as a post on this forum. And got some feedback from Frameworks Engineer here: https://developer.apple.com/forums/thread/688144 Let's hope it's corrected soon.
So you can see it for yourself if you download it.: I trust what you said. But it is no help, only some source code would allow to understand, as it is something in the project (I just tried a navigation controller in a brand new project and it worked fine.). Did you build some extensions for buttons ?
I did mark my post for watching, and did not receive any notification of your answer. I filed a bug report Aug 17, 2021 at 10:49 PM – FB9525818. Did you too ?
the () is at the end of the closure, to tell the closure to execute and return result, which initialise the var. If you write only var controller: NSWindowController? = { … } the var is a closure, not NSWindowController. With () at the end, closure executes and returns the expected NSWindowController.
Note that your code should not crash, whatever input user does. You have to make it more robust. May be the reason is you are converting to Float, something like let value = Float(textField.text!) If so, you should instead test for nil with: let value = Float(textField.text!) ?? 0.0
No, normally it is the order in the storyboard that matters. If you move Red View higher in list, it will appear below Green. Even if there is no IBOutlet created, just the views in IB.