Comments (4)
Since you are instantiating the app object, if you want to see updates, shouldn't you be updating self.distance
(the current value of distance), not self.param.distance.default
(the default value of distance, that will be used in the next instantiation, not this one)?
from param.
Indeed, this should be:
def update_range_default(self):
self.distance = (3., 17.)
from param.
Will close for now. Happy to reopen if we're both confused about what you're trying to achieve.
from param.
Since you are instantiating the app object, if you want to see updates, shouldn't you be updating
self.distance
(the current value of distance), notself.param.distance.default
(the default value of distance, that will be used in the next instantiation, not this one)?
Thank you @jbednar and @philippjfr for quick and to the point response with explanations! I occasionally am confused about when to use the param prefix when to update widgets, but your explanation helped, and the code I was working with now works well. Really appreciated :-)
from param.
Related Issues (20)
- Suggestions to improve the reactive expression guide
- 2.0.0rc6 - param.ListSelector Issue HOT 7
- In Windows, `import param` pops up a command line window HOT 3
- A “doc” directory is installed directly in site-packages
- Speed up load with 2% by improving _register_watcher HOT 3
- Speed up derived applications like Panel by speeding up Path Parameter
- Make it easy to use Traitlets including Ipywidgets/ AnyWidgets with Param HOT 1
- param.A + param.B = Param.C, how to express this relationship beween parameters ? HOT 2
- 'import param' fails: ImportError: cannot import name '__version__' from 'param._version' (/usr/local/lib/python3.9/site-packages/param/_version.py) HOT 13
- Add a `metadata` slot
- Cannot change instance attributes with a Callable without passing in parameterized class HOT 3
- Define Comparator equality functions for more types HOT 1
- DeprecationWarning in test_reactive_logic_unary_ops HOT 1
- Ability to apply @param.depends to all (nested) Parameters of a class HOT 1
- Param with bounds should default to lower bound HOT 7
- Add .is_active parameter to reactive expressions HOT 3
- Let reactive expressions .watch method support async functions
- Context manager .param.update should restore references
- Let pn.Param accept a list of objects HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from param.