Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling Entry.SetText and then Entry.Bind immediately will ignore the bound value #4235

Closed
2 tasks done
andydotxyz opened this issue Sep 11, 2023 · 2 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@andydotxyz
Copy link
Member

Checklist

  • 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

Due to recent "debounce" delay code the SetText is taken as user input, but if done before a bind this is not correct.

How to reproduce

  • Create an Entry
  • Set the text
  • Bind
  • See that the bound value is not shown

Screenshots

No response

Example code

s := binding.NewString()
s.Set("replace")
e := widget.NewEntry()
e.SetText("Thing")
e.Bind(s)

Fyne version

2.4.0

Go compiler version

1.21.1

Operating system and version

Darwin

Additional Information

No response

@andydotxyz andydotxyz added the unverified A bug that has been reported but not verified label Sep 11, 2023
@andydotxyz andydotxyz added this to the D fixes (v2.4.x) milestone Sep 11, 2023
@andydotxyz andydotxyz added bug Something isn't working and removed unverified A bug that has been reported but not verified labels Sep 11, 2023
@williambrode
Copy link
Contributor

This is the PR that added the delay code for reference: #4062

Another affect of this change is that bound entries don't update if changes are too rapid. I'll open a separate issue to track that - though its root cause will be the same.

@andydotxyz
Copy link
Member Author

Fixed on develop, will pick to release branch too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants