#4069 closed defect (fixed)
Declare initializer syntax is clumsy
Reported by: | sjmiles | Owned by: | sjmiles |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Core | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Published best practice syntax for declare in 0.4 was
dojo.declare("foo", base, function() { // do initialization },{ someProp: true } });
Although admittedly a reversal of an old decision, 0.9 best practice instead will be:
dojo.declare("foo", base, { constructor: function() { // do initialization }, someProp: true });
Change History (8)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 13 years ago by
comment:4 Changed 13 years ago by
comment:5 Changed 13 years ago by
comment:6 Changed 13 years ago by
(In [10078]) Adjust declare syntax in ProgressBar?.js, refs #4069.
Note: See
TracTickets for help on using
tickets.
(In [10026]) Implement mixin semantic as an inheritance tree to support robust "inherited", refs #4068. Support improved initializer syntax, including deprecation warning for older style, refs #4069.