Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Adobe Flex SDK Previous
-
None
-
None
-
Affected OS(s): All OS Platforms
Language Found: English
Description
Steps to reproduce:
1. Run attached.
Although SortField does work as documented I don't think you should have to set a locale on every sort field.
var sort:Sort = new Sort();
var sortField:SortField = new SortField(dataField);
// This code shouldn't be needed. It should default to this.
//const resourceManager:IResourceManager = ResourceManager.getInstance();
//const locales:Array = resourceManager.localeChain;
//sortField.setStyle("locale", locales[0]);
sort.fields = [sortField];
Actual Results:
Error: Undefined locale
atspark.collections::SortField/get stringCollator()[/Users/cframpto/dev/hero/frameworks/projects/spark/src/spark/collections/SortField.as:604]
atspark.collections::SortField/stringCompare()[/Users/cframpto/dev/hero/frameworks/projects/spark/src/spark/collections/SortField.as:794]
atspark.collections::Sort/internalCompare()[/Users/cframpto/dev/hero/frameworks/projects/spark/src/spark/collections/Sort.as:834]
atArray$/_sort()
atArray/http://adobe.com/AS3/2006/builtin::sort()
atspark.collections::Sort/sort()[/Users/cframpto/dev/hero/frameworks/projects/spark/src/spark/collections/Sort.as:763]
atmx.collections::ListCollectionView/internalRefresh()[/Users/cframpto/dev/hero/frameworks/projects/framework/src/mx/collections/ListCollectionView.as:1542]
atmx.collections::ListCollectionView/refresh()[/Users/cframpto/dev/hero/frameworks/projects/framework/src/mx/collections/ListCollectionView.as:477]
attestGrid/sortArrayCollection()[/Users/cframpto/dev/projects/wip/src/testGrid.mxml:84]
attestGrid/___testGrid_Button1_click()[/Users/cframpto/dev/projects/wip/src/testGrid.mxml:94]
Expected Results:
Sort works using the default locale for the application.
Workaround (if any):
set the locale style in the SortField