Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#15438 closed enhancement (fixed)

refactor scrollable to be used as a mixin to dojo.declare()

Reported by: bill Owned by: Eric Durocher
Priority: undecided Milestone: 1.8
Component: DojoX Mobile Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:


Issue 1: Scrollable is a class, but it can't be used as a mixin to dojo.declare(). This leads to workaround code like:

var cls = declare("", null, {});
lang.extend(cls, new Scrollable(dojo, dojox));

return declare("", [WidgetBase, Contained, cls], {

rather than the more direct:

return declare("", [WidgetBase, Contained, Scrollable], {

The problem can be fixed without introducing a dependency on dojo.declare(), by setting attributes on the prototype rather than on the instance.

Issue 2: the feature testing code should be using has.add() so that it can be stripped from a build.

Issue 3: the non-function attributes of scrollable have incorrect API doc blocks, so the doc parser won't pick them up.

The attached patch fixes these issues.

Attachments (1)

scrollableSimplification4.patch (20.3 KB) - added by bill 10 years ago.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by bill

comment:1 Changed 10 years ago by ykami

Thanks Bill, the patch looks good. Please go ahead. (I think constructor parameters in _ComboBoxMenu.js Line 71 can also be removed.)

comment:2 Changed 10 years ago by bill

Resolution: fixed
Status: newclosed

In [28699]:

Make Scrollable class usable as a mixin to dojo.declare(), fixes #15438 !strict.

comment:3 Changed 10 years ago by bill

Milestone: tbd1.8
Note: See TracTickets for help on using tickets.