You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
The callback provides when creating a new color picker is called when a color is chosen - great.
For the file dialogs the same callback is called with a nil value for dismissal - great.
This does not happen in the case of the color picker.
How to reproduce
Create a color picker with a callback function.
Show the color picker.
Hit the cancel button.
The callback function isn't called.
Screenshots
No response
Example code
package main
import (
"fmt""fyne.io/fyne/v2/app""fyne.io/fyne/v2/dialog""image/color"
)
funcmain() {
fapp:=app.NewWithID("app-with-unique-id")
win:=fapp.NewWindow("pick color")
cp:=dialog.NewColorPicker("", "", func(c color.Color) {
fmt.Println("Color callback called with:", c)
win.Close()
fapp.Quit()
}, win)
cp.Show()
win.Show()
fapp.Run()
}
Fyne version
2.5.2
Go compiler version
1.23.2
Operating system and version
Linux 6.1.0-26-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.112-1 (2024-09-30) x86_64 GNU/Linux
Additional Information
I will be happy to fix this bug.
I have to find out how this is done at Fyne first.
The text was updated successfully, but these errors were encountered:
This bug report doesn't seem to match what we discussed on Discord.
I thought you were reporting that OnClosed is called before the callback so you cannot tell if the item was picked when the dialog goes away if you register both?
Checklist
Describe the bug
The callback provides when creating a new color picker is called when a color is chosen - great.
For the file dialogs the same callback is called with a
nil
value for dismissal - great.This does not happen in the case of the color picker.
How to reproduce
Screenshots
No response
Example code
Fyne version
2.5.2
Go compiler version
1.23.2
Operating system and version
Linux 6.1.0-26-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.112-1 (2024-09-30) x86_64 GNU/Linux
Additional Information
I will be happy to fix this bug.
I have to find out how this is done at Fyne first.
The text was updated successfully, but these errors were encountered: