Comments (8)
The convention is that constructors should be named like the types. The lower-case versions, like int(...)
, are things that are (a) more coercive in conversions (no InexactErrors) and (b) may not return the corresponding type. e.g. int([1.0, 3.7])
works and returns an array of integers. See also JuliaLang/julia#1470.
So, in keeping with this convention, you should keep the constructors as uppercase, i.e. Slider(...)
and not slider(...)
. Hence, my vote is to revert this patch.
from interact.jl.
On the other hand, a function like widget(foo)
which automatically constructs a slider for a range foo
and a checkbox for a boolean foo
, as discussed as #11, should be lowercase, since widget
returns some arbitrary subtype of Widget
.
from interact.jl.
see #16...
from interact.jl.
I don't see how #16 is related to this. I'm just saying you should revert the case-change patch and make the Checkbox
constructor checkbox
, to follow Julia conventions.
How you store widget options has nothing to do with whether you capitalize the constructor.
from interact.jl.
The proposal in #16 eliminates the need for various widget types like Slider
, Checkbox
, instead replaced by InputWidget{:Slider}
, InputWidget{:Checkbox}
and so on, since they all will have the same two fields: options
, signal
. If I revert the patch now, and later go for a design such as #16, we are going to have to break existing notebooks which use Slider
and Checkbox
...
from interact.jl.
@stevengj Oh, slider
and checkbox
will still be constructors in that they consrtuct InputWidget
s so the convention is Slider
and Checkbox
? Will revert this if so.
from interact.jl.
Oh, I see. Yes, I suppose lower-case versions make sense then. But then why do you need slider
and checkbox
at all if you have widget(x; options)
to construct various types of InputWidget?
from interact.jl.
slider
for example provides default values for some of the arguments like value=median(range)
.
from interact.jl.
Related Issues (20)
- Does not work with Jupyterlab 3.0.14 HOT 1
- interact error with GLMakie in atom
- Widget creation gradually becomes very slow HOT 2
- Excruciatingly slow on Windows HOT 2
- More detailed examples of a standalone web page
- Compatibility issue with DataFrames HOT 1
- VS Code integration HOT 4
- TagBot trigger issue HOT 2
- ErrorException: Invalid dependency (must be a url, file, or AssetRegistry path): C:\Users\Stephen\.julia\packages\Knockout\3gjS1\src\..\assets\knockout.js HOT 5
- ERROR: UndefVarError: WEAVE_ARGS not defined HOT 1
- Update README to install webio jupyter extensions via Conda instead of WebIO
- map bang syntax help needed HOT 2
- How can I read a *.mat file as values {Float64} ?
- Julia: using @manipulate creates plot but doesn't update after saving notebook and reopening HOT 2
- when using @manipulate, it output error messages HOT 5
- Interact does not show widgets in IJulia HOT 2
- savedialog() on MacOSX throws UndefVarError HOT 6
- Doesn't seem to work in JupyterLab 3.1.7 HOT 2
- How to update two widgets on some event
- UndefVarError: setexcludinghandlers! not defined in Jupyter HOT 2
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 interact.jl.