#10277 closed defect (wontfix)
regression on getDescendants().filter() method
Reported by: | Pete Smith | Owned by: | anonymous |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Dijit | Version: | 1.4.0b |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Used to work in 1.3.2:
getAllValidatableDescendants: function(){ return this.getDescendants().filter(function(widg){ return widg.isValid; }); }
Had to change to in 1.4
getAllValidatableDescendants: function(){ var desc = this.getDescendants(); return dojo.filter(desc, function(widg){ return widg.isValid; }); }
Otherwise got object does not support this method (filter)
Change History (5)
comment:1 Changed 13 years ago by
Component: | General → Dijit |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
comment:2 Changed 13 years ago by
Bill I am referring to the this.getDescendants().filter which used to work. I had to do var desc = this.getDescendants(); dojo.filter(desc, function(widg)) on the results of this.getDescendants.
comment:4 Changed 13 years ago by
bill - sorry for not being clear enough. It is just any widget that extends _Widget.
comment:5 Changed 13 years ago by
Summary: | regression on filter method → regression on getDescendants().filter() method |
---|
OK, thanks. Hmm, that's strange, _Widget.getDescendants() hasn't changed significantly from the 1.3 days, it seems like your 1.3.2 code wouldn't work either in the case when this.containerNode wasn't defined.
Note: See
TracTickets for help on using
tickets.
Your description is missing a lot of information; it has no test case and doesn't list which component you are referring. I'm guessing you are referring to dijit but no idea what widget you are talking about.
Anyway, _Widget.getDescendants().filter() was never supposed to work in any version of dijit. The API contract for getDescendants() is that it returns an array of widgets. That was documented in 1.3 and 1.4.