Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#211 closed defect (fixed)

[patch] Dialog widget is broken on all plaforms.

Reported by: eugene@… Owned by: anonymous
Priority: high Milestone:
Component: Widgets Version: 0.1
Keywords: Cc:
Blocked By: Blocking:

Description

I tried test_Dialog.html in FF, IE, Op --- it doesn't work with different symptoms: FF lacks background, IE blows because of use of undefined object, Op --- like FF + everything is black.

Attachments (1)

dojo.test_Dialog.patch (367 bytes) - added by eugene@… 14 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 14 years ago by eugene@…

On IE test_Dialog.html breaks here:

function init(e) {
	dlg = dojo.widget.manager.getWidgetsByType("Dialog")[0];
	var btn = document.getElementById("hider");
	dlg.setCloseControl(btn);
}

dojo.widget.manager.getWidgetsByType("Dialog") returns empty array. dlg.setCloseControl(btn) bombs later.

The reason is simple:

this.getWidgetsByType = function(type){
	var lt = type.toLowerCase();
	var ret = [];
	dojo.lang.forEach(this.widgets, function(x){
		if(x.widgetType.toLowerCase() == lt){
			ret.push(x);
		}
	});
	return ret;
}

This function has exacly one meaningful part: "for each" iteration. Debugging reveals that this.widgets is empty array.

I don't know how it supposed to work and who is responsible for widgets array --- I cannot fix it, unless you give me some tips on how it was supposed to work. It looks like widget machinery and widget manager don't work on IE properly.

comment:2 Changed 14 years ago by eugene@…

Patch in #212 reduces the problem on IE. Now only background is missing like on FF and Op.

Changed 14 years ago by eugene@…

Attachment: dojo.test_Dialog.patch added

comment:3 Changed 14 years ago by eugene@…

severity: majornormal
Summary: Dialog widget is broken on all plaforms.[patch] Dialog widget is broken on all plaforms.

Missing background is due to renaming of underlying class --- see the patch.

comment:4 Changed 14 years ago by alex

Milestone: 0.2release
Resolution: fixed
Status: newclosed

Eugene,

Thank you so much for tracking this down. I've applied your patch as [2213].

comment:5 Changed 12 years ago by (none)

Milestone: 0.2release

Milestone 0.2release deleted

Note: See TracTickets for help on using tickets.