Opened 14 years ago
Closed 14 years ago
#8321 closed defect (fixed)
"Too much recursion" when a class extends both ContentPane *and* _Container
Reported by: | dante | Owned by: | Nathan Toone |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | DojoX Widgets | Version: | 1.2.3 |
Keywords: | Cc: | Nathan Toone | |
Blocked By: | Blocking: |
Description
not sure where it broke, but noticed http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/widget/tests/test_RollingList.html throws a too much recursion error on startup.
Change History (8)
comment:1 Changed 14 years ago by
Cc: | Nathan Toone added |
---|---|
Owner: | changed from Nathan Toone to bill |
comment:2 Changed 14 years ago by
Owner: | changed from bill to Nathan Toone |
---|
I suspect it's because RollingListPane? inherits from _Contained even though that's already included by ContentPane?:
dojo.declare("dojox.widget._RollingListPane", [dijit.layout.ContentPane, dijit._Templated, dijit._Contained], {
but
dojo.declare( "dijit.layout.ContentPane", [dijit._Widget, dijit._Container, dijit._Contained],
(If that's the case we should update the release notes w/that caveat about classes that extend ContentPane? and also extend either _Container or _Contained.
comment:3 Changed 14 years ago by
Summary: | [dojox.widget] Too much recursion in RollingList → "Too much recursion" when a class extends both ContentPane *and* _Container |
---|
Yes - that was the case...there is also one other place that I could find (by quickly grep-ing the source) that this is happening - the other is in dojox/presentation/_base.js (test_presentation.html fails with the same error)
I will fix the one in RollingList? - but would like to know who is the owner of presentation - so that they can verify that is the desired fix for that code as well...
(I'm also changing the summary so that it's more indicative of the issue)
comment:4 Changed 14 years ago by
BTW - is there not a way somewhere in dojo.declare to identify that this is happening and not load the class the second time? That is, be able to identify during the dojo.declare process that ContentPane? already inherits from _Container - and therefore, we do not load _Container or try to mix it in the second time? There are other cases where I have found this happening, and it seems to me that it would be helpful to not mixin the same stuff twice...
(though it might not be possible...that's just a thought)
comment:5 Changed 14 years ago by
(also - a quick removal of dijit._Container from dojox/presentation/_base.js doesn't work...so that one will take a bit more investigation)
@bill: Yes - at the very least, we probably want to update the release notes.
comment:6 Changed 14 years ago by
(In [16183]) Refs #8321 - now that ContentPane? already inherits from _Container, we get errors if we inherit from it a second time !strict
comment:7 Changed 14 years ago by
(In [16189]) Widgets that extend ContentPane? shouldn't also extend _Container or _Contained, as those are already implemented by ContentPane?. Presentation still not working but this gets it closer (note that it wasn't working before [15974] either).
comment:8 Changed 14 years ago by
Milestone: | tbd → 1.3 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
OK thanks, I updated the release notes and also the Presentation code (although it's still not working, see above comment).
Re: dojo.declare(), would be nice if it handled this case better but I'm not in a position to fix it or even comment on whether that's even possible.
Looks like this happened with checkin [15974] - related to #7819. Bill, any ideas on what could be happening?