question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: why do you use a lot of different attributes for the "value" of a widget (in the model), rather than just using "value"?

See original GitHub issue
  • The value of a slider is stored in the value attribute of the model.
  • The value of a dropdown selector is stored in the index attribute of the model, and value is not used.
  • The “value” of an output widget (list of output messages) is stored in the output attribute of the model.
  • … and potentially infinitely more variations.

Question: Is there a good reason for this? Are there situations where the value of a widgets involves multiple attributes in the model at once?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jasongroutcommented, Apr 19, 2019

For the output widget - that indeed could have been .value instead of .outputs. My mistake. Perhaps we can change it in ipywidgets 8.

0reactions
jasongroutcommented, Apr 20, 2019

Closing as answered.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Attributes and properties - The Modern JavaScript Tutorial
sayHi(); // Hello, I'm BODY. So, DOM properties and methods behave just like those of regular JavaScript objects: They can have any value....
Read more >
<input>: The Input (Form Input) element - HTML
The <input> element is one of the most powerful and complex in all of HTML due to the sheer number of combinations of...
Read more >
Django widget tweaks and variable attributes - Stack Overflow
I have tried to apply append_attr the newly created attribute but I'm seeing AttributeError: 'SafeString' object has no attribute 'as_widget' ...
Read more >
Introduction to widgets - Flutter documentation
Flutter widgets are built using a modern framework that takes inspiration from React. The central idea is that you build your UI out...
Read more >
Simple Chart Widget - Qualtrics
About Simple Chart Widgets. The simple chart widget allows you to display data in a range of basic charts. Changing the chart type,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found