Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#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 12 years ago by sjmiles

(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.

comment:2 Changed 12 years ago by sjmiles

Resolution: fixed
Status: newclosed

comment:3 Changed 12 years ago by sjmiles

(In [10052]) Monster commit to update uses of declare to new cleaner syntax, refs #4069. Changes are 99% syntactic only. If you have a problem, let me know and I will help you fix it asap.

comment:4 Changed 12 years ago by sjmiles

(In [10058]) Fix files that got messed up when merging changes, refs #4069.

comment:5 Changed 12 years ago by Eugene Lazutkin

(In [10062]) Reverting back changes, which were lost during the dojo.declare cleanup. Refs #4069.

comment:6 Changed 12 years ago by sjmiles

(In [10078]) Adjust declare syntax in ProgressBar?.js, refs #4069.

comment:7 Changed 12 years ago by sjmiles

(In [10081]) Adjust declare syntax in RichText?.js, refs #4069.

comment:8 Changed 12 years ago by liucougar

(In [10179]) refs #4069: Adjust declare syntax in range.js

Note: See TracTickets for help on using tickets.