asticode/go-astilectron

"MessageBoxOnClose" doesn't seem to be working.

Closed this issue · 5 comments

Hey there,

I'm trying to add a confirm dialog when a window is closed on Windows:

MessageBoxOnClose: &astilectron.MessageBoxOptions{
	Type:      astilectron.MessageBoxTypeQuestion,
	Title:     "Confirm",
	Message:   options.ConfirmQuitMessage,
	Buttons:   []string{"Yes", "No"},
	ConfirmID: astikit.IntPtr(0),
}

This correctly displays a message box when quitting, however the window itself does not close and the application does not quit.

Do you know what might be causing this?

I was causing this 😆

I fixed the bug and bumped the whole ecosystem.

Can you confirm ?

Works great now!

Thank you :)

Looks like the fix worked - but I'm having an issue running an app with bootstrap after upgrading the dependencies. Clearing the vendor directory seemed to work, but not when testing the version with the old dependencies.

ERROR   Execution failed: starting astilectron failed: provisioning failed: provisioning astilectron failed: unzipping C:\Users\nicktikhonov\AppData\Roaming\App\vendor\astilectron-v0.37.0.zip\astilectron-0.37.0 into C:\Users\nicktikhonov\AppData\Roaming\App\vendor\astilectron failed: unzipping C:\Users\nicktikhonov\AppData\Roaming\App\vendor\astilectron-v0.37.0.zip\astilectron-0.37.0 into C:\Users\nicktikhonov\AppData\Roaming\App\vendor\astilectron failed: astikit: content in archive does not match specified internal path astilectron-0.37.0

Wondering if this is an issue with the ecosystem or something on our side

This usually happens when you forget to go install the bundler after having bumped all dependencies.

When bumping all dependencies you need to :

  1. bump go-astilectron
  2. bump go-astilectron-bundler
  3. run go install ./astilectron-bundler
  4. bump go-astilectron-bootstrap

And you should be good to go

That worked, thanks for the instructions 👍