asticode / go-astilectron-bootstrap

Create a one-window application using Astilectron
MIT License
60 stars 37 forks source link

Return astilectron.Astilectron from bootstrap.Run function? #3

Closed narup closed 6 years ago

narup commented 6 years ago

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

Thank

asticode commented 6 years ago

@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?