Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#4073 closed defect (fixed)

DropDownButton requires _Container

Reported by: Sam Foster Owned by: bill
Priority: high Milestone: 0.9
Component: Dijit - Form Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

dijit.form.DropDownButton? inherits from dijit._Container, but this is not currently dojo.require-d in this file. The symptoms I'm seeing are:

load up ./dijit/tests/test_Toolbar.html (I tested FF2, IE6,7) and I get an error:

failed loading ../../dojo/../dijit/form/Button.js with error: Mixin #0 to declaration of dijit.form.DropDownButton? is null. It's likely a required module is not loaded.

The Button's own test page does not have the same issue, probably because it requires dojo.require("dijit.Menu"), which pulls in _Container. Adding dojo.require("dijit._Container"); to the top of ./dijit/form/Button.js fixes this.

Aside: if I was fine-tuning a build, I might well want to just bake in Button, but not DropDownButton? and ComboButton? (and the _Container dependency). Is there a reason these are all in the same file?

Change History (3)

comment:1 Changed 12 years ago by bill

Thanks, will fix. The reason all the buttons are in one file is because sometimes people don't do a build, or they use a build that doesn't include Button.js (because they are using a shared build or because most of their pages don't have Buttons). In this case we want to reduce the total number of files they need to download. It's a tradeoff.

comment:2 Changed 12 years ago by bill

Resolution: fixed
Status: newclosed

(In [10042]) DropDownButton? doesn't need to mixin _Container. Fixes #4073.

comment:3 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.