Opened 15 years ago

Closed 15 years ago

#511 closed enhancement (fixed)

Toolbar.js needs some cleanup

Reported by: anonymous Owned by: bill?
Priority: high Milestone:
Component: Widgets Version: 0.2
Keywords: Cc: [email protected]
Blocked By: Blocking:

Description

Toolbar.js uses a mix of constructor-based and prototype-based object setup, and has two inconsistent ways of invoking methods on the parent class. Attached is a patch that makes the code more internally consistent, as well as more consistent with other widget code. Moving object setup logic out of constructor functions and into prototypes improves efficiency as well.

These changes also make it possible to create sub-classes using the normal Dojo idioms. With the current code, things like setting a sub-class's widgetType property in its prototype break because the subclass value gets overridden by the call to the parent constructor function.

Attachments (2)

Toolbar.js.cleanup-patch.txt (19.6 KB) - added by [email protected] 15 years ago.
Patch to clean things up (diff against 0.2.2, but should apply easily on trunk I think)
Toolbar.js.patch-cleanup-trunk.txt (19.8 KB) - added by [email protected] 15 years ago.
Patch against current trunk

Download all attachments as: .zip

Change History (6)

comment:1 Changed 15 years ago by bill

who filed this bug?

Changed 15 years ago by [email protected]

Patch to clean things up (diff against 0.2.2, but should apply easily on trunk I think)

comment:2 Changed 15 years ago by [email protected]

Oops, sorry, forgot to fill in my 'username'; that should probably be a required field, in the initial form and/or that attach file dialog, given the CLA requirements and the resulting need to be able to identify and/or get in touch with whoever submits patches...

Changed 15 years ago by [email protected]

Patch against current trunk

comment:3 Changed 15 years ago by anonymous

Cc: [email protected] added

comment:4 Changed 15 years ago by bill

Resolution: fixed
Status: newclosed

Thanks for the patch, checked in as rev #3272.

Note: See TracTickets for help on using tickets.