Opened 14 years ago

Closed 14 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: laurie@…
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 laurie@… 14 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 laurie@… 14 years ago.
Patch against current trunk

Download all attachments as: .zip

Change History (6)

comment:1 Changed 14 years ago by bill

who filed this bug?

Changed 14 years ago by laurie@…

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

comment:2 Changed 14 years ago by laurie@…

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 14 years ago by laurie@…

Patch against current trunk

comment:3 Changed 14 years ago by anonymous

Cc: laurie@… added

comment:4 Changed 14 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.