#490 closed defect (fixed)
dictionary.item(k) should return item unmodified, suggested fix included.
Reported by: | anonymous | Owned by: | Tom Trenka |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Core | Version: | 0.2 |
Keywords: | dictionary, item | Cc: | |
Blocked By: | Blocking: |
Description
IMHO dojo.collections.dictionary.item(k) should return the item unmodified - as the user put it there with dojo.collections.dictionary.add(k,v).
The user should not need to be concerned with the internal storage (DictionaryEntry?) of the dictionary, and should be able to add and get items in the same forms.
The code as it stands is this:
this.item = function(k){
return items[k];
};
I would suggest changing it to:
this.item = function(k){
return items[k].valueOf();
};
Change History (4)
comment:1 Changed 16 years ago by
Component: | General → Core |
---|
comment:2 Changed 16 years ago by
Milestone: | 0.2.2release → 0.3release |
---|---|
Owner: | changed from anonymous to Tom Trenka |
comment:3 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Changed in Dictionary and SortedList?. Also added a new method, "entry", that returns the raw DictionaryEntry? object.