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

Add valueAsInt and valueAsDouble to dart:html #8163

Closed
sethladd opened this issue Jan 28, 2013 · 10 comments
Closed

Add valueAsInt and valueAsDouble to dart:html #8163

sethladd opened this issue Jan 28, 2013 · 10 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant library-html type-enhancement A request for a change that isn't a bug

Comments

@sethladd
Copy link
Contributor

See https://github.com/dart-lang/web-ui/issues/317

I'd love to bind HTML fields to Dart model objects that have been annotated with int and double.

Right now we have valueAsNumber which returns a variable annotated with num. Adding valueAsInt and valueAsDouble lets me use Web UI to bind to int's and double's.

Thanks!!

@jmesserly
Copy link

I wonder what the real thing is in browsers. Presumably it's a double. Maybe dart:html could do the conversion. Not sure how they've handled similar issues before, but presumably a lot of DOM numbers have this problem.

@sethladd
Copy link
Contributor Author

sethladd commented Feb 1, 2013

One idea is for Web UI to provide conversion filters. One way or another, I'd love to bind to models that are annotated with int :)

@DartBot
Copy link

DartBot commented Feb 4, 2013

This comment was originally written by jona...@gmail.com


I would like this feature as well. Got to this issue from web-ui issue #317.

@jmesserly
Copy link

@seth, we'll definitely have filters in web_ui. But the int/double distinction seems useful to capture in our DOM-for-Dart, since not everyone will be using web_ui package.

@blois
Copy link
Contributor

blois commented Mar 13, 2013

I worry about adding duplicate members which are backed by the same field, just for the purpose of coercion to the binding destination.

I think this is something which should be addressed further down in the binding system.

It would be nice if doubles or ints could automatically be coerced by the binding system.

@blois
Copy link
Contributor

blois commented Mar 21, 2013

Added this to the Later milestone.

@kevmoo
Copy link
Member

kevmoo commented Apr 7, 2014

Removed Area-HTML label.
Added Area-Library, Library-Html labels.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@alan-knight
Copy link
Contributor

I don't think Polymer suffers from this problem. It seems like the click counter example does exactly this.


Added AssumedStale label.

@sethladd sethladd added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-html closed-obsolete Closed as the reported issue is no longer relevant labels Jan 14, 2015
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant library-html type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

7 participants