markwyner
14 Jun 2011, 3:11 PM
Sencha Touch version tested:
1.1.0
Platform tested against:
iOS 4
Android 2.2
Description:
I have discovered that when I add records to localStorage and then call them into a select menu their sorting is impacted by the case of the first letter in a word. Here is a screen shot that shows a select menu with two entries for the same word (tofu), one with a capital T and the other with a lower case T:
http://i.imgur.com/x9F5g.png
Test Case:
var all_items = [{text: 'Choose an Item',value: null},];
StoreItems.each(function(rec) {
all_items.push({
value: rec.get('itemName'),
text: rec.get('itemName')
});
});
var list_item_select = new Ext.form.Select({
name: 'ListItems',
id: 'List_Items',
cls: 'Rounded',
options: all_items
});
Ext.regModel('Items', {
fields: ['id', 'itemName', 'itemCat', 'itemImg'],
proxy: {
type: 'localstorage',
id: 'item_list'
}
});
var StoreItems = new Ext.data.Store({
model: 'Items',
autoLoad: true,
autoSave: true
});
Here is another example of how I'm seeing this issue:
http://i.imgur.com/xu2is.png
This list is set to:
StoreItems.sort('itemName','ASC');
Which means the order should be "Zebra" then "ZZebra." But this bug shows "ZZebra" first. This is because the second "Z" in "ZZebra" is given sequential precedence over the lower-case "e" in "Zebra" solely because it is capitalized.
Steps to reproduce the problem:
Create a store with a simple list of records, some beginning with capital letters and some beginning with lowercase letters.
Display the store in a select menu or list panel sorting by name in alphabetical order (ASC).
The result that was expected:
All items listed alphabetically.
The result that occurs instead:
Items listed alphabetically with sorting preference given to capital letters. Lower case letters which precede capital letters in the alphabet are listed after letters which follow them alphabetically if they are capitalized.
Debugging already done:
none
Possible fix:
not provided
1.1.0
Platform tested against:
iOS 4
Android 2.2
Description:
I have discovered that when I add records to localStorage and then call them into a select menu their sorting is impacted by the case of the first letter in a word. Here is a screen shot that shows a select menu with two entries for the same word (tofu), one with a capital T and the other with a lower case T:
http://i.imgur.com/x9F5g.png
Test Case:
var all_items = [{text: 'Choose an Item',value: null},];
StoreItems.each(function(rec) {
all_items.push({
value: rec.get('itemName'),
text: rec.get('itemName')
});
});
var list_item_select = new Ext.form.Select({
name: 'ListItems',
id: 'List_Items',
cls: 'Rounded',
options: all_items
});
Ext.regModel('Items', {
fields: ['id', 'itemName', 'itemCat', 'itemImg'],
proxy: {
type: 'localstorage',
id: 'item_list'
}
});
var StoreItems = new Ext.data.Store({
model: 'Items',
autoLoad: true,
autoSave: true
});
Here is another example of how I'm seeing this issue:
http://i.imgur.com/xu2is.png
This list is set to:
StoreItems.sort('itemName','ASC');
Which means the order should be "Zebra" then "ZZebra." But this bug shows "ZZebra" first. This is because the second "Z" in "ZZebra" is given sequential precedence over the lower-case "e" in "Zebra" solely because it is capitalized.
Steps to reproduce the problem:
Create a store with a simple list of records, some beginning with capital letters and some beginning with lowercase letters.
Display the store in a select menu or list panel sorting by name in alphabetical order (ASC).
The result that was expected:
All items listed alphabetically.
The result that occurs instead:
Items listed alphabetically with sorting preference given to capital letters. Lower case letters which precede capital letters in the alphabet are listed after letters which follow them alphabetically if they are capitalized.
Debugging already done:
none
Possible fix:
not provided