Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2370 closed defect (fixed)

Copy-Paste error in dojo.collections.Store

Reported by: guest Owned by: Tom Trenka
Priority: high Milestone:
Component: Collections Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:


In the dojo.collections.Store class, a copy-paste error occured when coding the addDataRange method.

In fact, addDataRange method uses the code of the addData method. Here is the bug :

this.addDataRange = function(/*array*/arr){
		//	summary
		//	Add a range of objects to the internal data array.
		var objects=[];
		for(var i=0; i<arr.length; i++){
			var k = arr[i][this.keyField];
				var o = this.getByKey(k);
				o.src = obj;
			} else {
				var o = { key:k, src:arr[i] };

During execution, a Javascript error "obj is not defined" shows up. In the for loop, the line :

o.src = obj;

may be :

o.src = arr[i];

Change History (4)

comment:1 Changed 15 years ago by dylan

Milestone: 0.9

comment:2 Changed 15 years ago by Tom Trenka

Resolution: fixed
Status: newclosed

(In [7161]) Fixes #2370.

comment:3 Changed 15 years ago by Tom Trenka


comment:4 Changed 15 years ago by (none)

Milestone: 0.4.2

Milestone 0.4.2 deleted

Note: See TracTickets for help on using tickets.