Window:showasync()method


Shows and activates the Window asynchronously, returning a Task that completes when the Window is closed. This is the preferred way to run the UI message loop in async code.

Return value

This method returns no value

Example

--! luart-extensions import ui -- create a simple window local win = ui.Window("Window:showasync() sample") -- shows the Window and waits until it's closed await win:showasync() print("Window closed!")