asticode / go-astilectron-bootstrap

Create a one-window application using Astilectron

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Return astilectron.Astilectron from bootstrap.Run function?

narup opened this issue · comments

commented

Thanks for this bootstrap. Any reason why Run function is not returning astilectron.Astilectron pointer? Could allow more customization on the caller side.

Thank

@narup the Run method is the blocking pattern therefore it never returns unless there's a fatal error. Hence it's not possible to return anything other than the error.

Nonetheless, you can retrieve *astilectron.Astilectron by using the OnWait option that allows you to store pointers to all valuable elements.

Does that answer your question?