Opened 12 years ago

Closed 12 years ago

#4463 closed defect (fixed)

Regression in [10478]: test_FilteringSelect generates error

Reported by: haysmark Owned by: James Burke
Priority: high Milestone: 1.0
Component: Core Version: 0.9
Keywords: 4dijit Cc:
Blocked By: Blocking:

Description (last modified by haysmark)

Load this in Firefox:

I get this in Firebug: is not a constructor
[Break on this error] myStore2 = new{url: 'comboBoxDataToo.json'});

Which is strange because the line right before it also declares an ItemFileReadStore? and it works fine. This starts happening in [10478]. This did not happen in [10477].

Change History (5)

comment:1 Changed 12 years ago by haysmark

Description: modified (diff)

comment:2 Changed 12 years ago by James Burke

This is caused because this test page has debugAtAllCosts set to true in the page, however it tries to do these two lines outside of a dojo.addOnLoad() block:

myStore = new{url:"comboBoxData.json"});
myStore2 = new{url: 'comboBoxDataToo.json'});

I can see where they cannot be done in an addOnLoad callback, since that callback will not be called after widget parsing, and there are some widgets declared in markup that use those stores. So my fix is going to be to remove debugAtAllCosts for now. If you want to use debugAtAllCosts in the page, turn off parseOnLoad, put the myStore lines in a dojo.addOnLoad() call, then after that, parse the page for widgets.

comment:3 Changed 12 years ago by bill

Thanks. Actually those data stores should be declared in markup like

	<div dojoType="" jsId="myStore"
	<div dojoType="" jsId="myStoreToo"

... just because that's the standard way we are doing stuff in dijit nowadays. I'll update that.

comment:4 Changed 12 years ago by bill

(In [10528]) Declare data stores in markup. Refs #4463.

comment:5 Changed 12 years ago by James Burke

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.