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

Changing data in view? #4

Closed
stephen-bunn opened this issue Apr 13, 2017 · 2 comments
Closed

Changing data in view? #4

stephen-bunn opened this issue Apr 13, 2017 · 2 comments

Comments

@stephen-bunn
Copy link

stephen-bunn commented Apr 13, 2017

Could you give a quick example on how to change the data within the view after creating the widget?
Currently setting the model's data and calling update doesn't work for me.

@williballenthin
Copy link
Owner

williballenthin commented May 1, 2017

hey @ritashugisha

there isn't a simple example of this since (unfortunately) i didn't design the library for editing.

here's what i think might work:

  • update view._buf
  • update view.model._buf
  • call view.model._emit_data_changed(start-index, end-index)

as you can see, you have to reach into some members that aren't meant to be public. i'd be interested to hear if you're able to get this to work!

@stephen-bunn
Copy link
Author

I never tried to get this to work. But I'm thinking your suggestion should get people close to a solution.

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

No branches or pull requests

2 participants