Skip to content

FilteredElementList - Exception: RangeError: -1 must be greater than or equal to 0 #6982

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

Closed
DartBot opened this issue Nov 27, 2012 · 5 comments
Assignees
Labels
web-libraries Issues impacting dart:html, etc., libraries
Milestone

Comments

@DartBot
Copy link

DartBot commented Nov 27, 2012

This issue was originally filed by @financecoding


What steps will reproduce the problem?

  1. https://gist.github.com/4156482

What is the expected output? What do you see instead?
Expected collection size to be zero, instead a RangeError is thrown. The problem seems to be in the setter.
void set length(int newLength);

What version of the product are you using? On what operating system?
Dart Editor version 0.2.4_r15130
Dart SDK version 0.2.4.2_r15130

Please provide any additional information below.

@dgrove
Copy link
Contributor

dgrove commented Nov 28, 2012

Set owner to @blois.
Added Area-Dart2JS, Triaged labels.

@dgrove
Copy link
Contributor

dgrove commented Nov 28, 2012

Removed Area-Dart2JS label.
Added Area-HTML label.

@blois
Copy link

blois commented Dec 6, 2012

FilteredElementList should not be a fully public API- probably needs to move to html_common.


Added this to the M2 milestone.

@blois
Copy link

blois commented Dec 6, 2012

Added Accepted label.

@blois
Copy link

blois commented Dec 6, 2012

I've fixed the length issue, but unfortunately this class was not intended to be public and has been moved.

In general this class is a bit odd as it's not a perfect adapter from List<Node> to List<Element>- I would recommend just filtering the collection rather than providing a live wrapper as this does.


Added Fixed label.

@DartBot DartBot added Type-Defect web-libraries Issues impacting dart:html, etc., libraries labels Dec 6, 2012
@DartBot DartBot added this to the M2 milestone Dec 6, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web-libraries Issues impacting dart:html, etc., libraries
Projects
None yet
Development

No branches or pull requests

3 participants