#13814 closed defect (fixed)
[regression] dijit.Calendar no longer inherits dijit._Widget
Reported by: | Kenneth G. Franqueiro | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | Dijit | Version: | 1.7.0b1 |
Keywords: | calendar | Cc: | |
Blocked By: | Blocking: |
Description
If I'm reading the source correctly, presently the inheritance chain of dijit.Calendar is as follows:
dijit.Calendar <- dijit.CalendarLite <- dijit._WidgetBase dijit.Calendar <- dijit._CssStateMixin
However, prior to 1.7, dijit.Calendar directly inherited dijit._Widget, not _WidgetBase.
Should we also mix dijit._Widget into dijit.Calendar? I'm not sure if anything within the toolkit would break without it, but I presume it's possible that user code may be relying on features of it that will be missing otherwise.
Change History (10)
comment:1 Changed 9 years ago by
Cc: | bill removed |
---|---|
Owner: | set to bill |
Status: | new → assigned |
comment:2 Changed 9 years ago by
I was wondering if you'd say that. I don't think it should actually require that effort (and I'm not sure how high-risk that is at this point in the cycle, as simple as it probably is). declare
should be able to mix _Widget
directly into Calendar
anyway (in addition to CalendarLite
), due to how it linearizes multiple inheritance chains, right?
comment:3 Changed 9 years ago by
I'm not sure, that would mean that Calendar was inheriting _WidgetBase twice, which sounds dangerous. I thought Eugene said not to do that, but I can't be sure.
comment:4 Changed 9 years ago by
I reckon it should be avoided where possible, but if I'm reading this right, it ought to work:
http://dojotoolkit.org/reference-guide/dojo/declare.html#id2
comment:5 Changed 9 years ago by
I guess you are right. I tried it and it seems to work (the regression tests pass). I'll check that in.
comment:7 Changed 9 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I'm a bit confused but maybe I'm missing something: why was _CssStateMixin
taken out of the inheritance chain? It was in the chain in 1.6.
I didn't think _Widget
ever mixed that in, and if I'm reading correctly, it doesn't now, either - and neither does CalendarLite
- so doesn't Calendar
still need to mix that in?
comment:8 Changed 9 years ago by
Oops, I thought it was getting pulled in by _Widget, but you are right. I'll add it back.
Good point, probably I should split out the deferred-connect stuff and the deprecated methods from _Widget into separate mixins (making _Widget nothing but a combination of other classes), and then include those mixins in Calendar.