Opened 13 years ago

Closed 13 years ago

#1283 closed defect (invalid)

Button Dependency Loading

Reported by: guest Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

Hi,

This does not work:

dojo.require("dojo.widget.*"); dojo.require("dojo.widget.Button"); dojo.require("dojo.widget.Editor2"); var btn = dojo.widget.createWidget("Button",

{ label: "PressMe?", disabled: false });

function testCreatedBtn() {

assertTrue(btn.label=="PressMe?");

}

However, if

dojo.require("dojo.widget.Editor2");

is commented in, it works.

It looks like the Editor2 requirement loads dependencies that the Button should load.

Cheers,

  • Ole

Attachments (1)

test_Button_MPJ.html (861 bytes) - added by morris 13 years ago.
Trying to repeat - but cant.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 13 years ago by ole_ersoy@…

BTW - If anyone figures this out - could you please let me know:

ole_ersoy@…

Thanks,

  • Ole

comment:2 Changed 13 years ago by morris

Tried to repeat this, but couldnt. Need more information I think. Emailed the submitter.

Changed 13 years ago by morris

Attachment: test_Button_MPJ.html added

Trying to repeat - but cant.

comment:3 Changed 13 years ago by morris

Surely it isnt that he is commenting out the var btn = dojo.widget.createWidget - SURELY not. Will ask.

dojo.require("dojo.widget.Editor2"); var btn = dojo.widget.createWidget("Button",

{ label: "PressMe?", disabled: false });

comment:4 Changed 13 years ago by morris

Resolution: invalid
Status: newclosed

You can't create widgets in the <head> because <body> doesnt exist yet.

Note: See TracTickets for help on using tickets.