Closed kokonjac closed 1 month ago
I found that the data type of LayoutPriority is not correct. LayoutPriority should be 32-bit floating point number, while appkit go enum define it as 64-bit:
type LayoutPriority float64
Changing it to float 32 fixes crash for SetContentHuggingPriorityForOrientation.
@hsiafan Thanks for figuring this out. I thought I had tried this before, but I guess not. I would love a PR to fix the generation code on this if you're willing.
Turns out we were treating all floats the same, but it's been fixed. Thanks all!
go run ./macos/_examples/layout/main.go Error:
The cause of this error may be setting a negative priority when using Auto Layout. But there seems to be no problem with the parameters of SetContentHuggingPriorityForOrientation. Wondering why.