Opened 15 years ago

Closed 15 years ago

#2706 closed defect (invalid)

bug in Store.addData

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



I think there is a bug in Store.addData when the store is used as a list collection (keys not used), e.g. in charting addData does not work because all the subsequent addition are indexed in items[null]

Suggested fix:

this.addData = function(/* object */obj, /*string?*/key, /* boolean? */bDontFire){

Add an object with optional key to the internal data array.

var k = key

if(k && items[k]!=null){ ~

here k must be tested first. if it is not null, then check items

Change History (3)

comment:1 Changed 15 years ago by Adam Peller

Owner: changed from anonymous to Tom Trenka

comment:2 Changed 15 years ago by Adam Peller

Component: GeneralCollections

comment:3 Changed 15 years ago by Tom Trenka

Resolution: invalid
Status: newclosed

The Store was designed primarily as a hashtable-based collection, not as an indexed one; the lack of a key is not an option.

Closing as invalid.

Note: See TracTickets for help on using tickets.