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

Fix various issues with how List and Map advertised Get/Set #1711

Merged
merged 8 commits into from
Jan 4, 2021

Conversation

andydotxyz
Copy link
Member

Issues raised during chat about re-loading data in binding

a) Get and Set were not possible for the underlying list or struct, so the current Get/Set was renamed GetValue/SetValue
b) New Get and Set were added to provide access to the core data, checking for changes where possible for set
c) trigger the container on size/key change and otherwise trigger value listeners if the data item changed.
d) export the Untyped type because sometimes we will need it just like Int

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.
  • Public APIs match existing style.

Copy link
Contributor

@AlbinoGeek AlbinoGeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the direction :) This allows us to (ini json yaml) Unmarshal and Set() as discussed in Slack, without having to create and re-assign the binding variable.

Copy link
Contributor

@AlbinoGeek AlbinoGeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ not a reviewer, but ]

Considering the discussion in slack, I think this implementation looks well, and would handle (for example) Unmarshal correctly now. The only missing bit belongs in another PR anyways (concerning the Reload method.)

This feels more consistent with the other binding types. It looks good to me.

Copy link
Member

@Jacalz Jacalz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a sane approach to me.

@andydotxyz andydotxyz merged commit 02838f9 into fyne-io:develop Jan 4, 2021
@andydotxyz andydotxyz deleted the fix/binding-getset branch January 4, 2021 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants