Replies: 1 comment 4 replies
-
That’s a perfectly fine question, not noob at all :). In fact, I think calling hide() is fine, it’s a bug that you’re getting a runtime error. I’ll take a look at that and see if I can reproduce it. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sorry for this noob question. I am trying to play with sixtyfps and had the following simple dialog in my code:
I have the corresponding Rust code:
This works but I want to close the window after the user clicks any of those buttons. So far I could not find a way that works. The closest I got is calling
hide()
in the callback:But the above encounters a runtime borrow checker error:
thread 'main' panicked at 'already borrowed: BorrowMutError'
.What's the best way to close a window from a callback? Also, is there a dialog widget already which does what I am trying to do: ask a question and collect a yes/no or ok/cancel answer from the user?
Beta Was this translation helpful? Give feedback.
All reactions