Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Adobe Flex SDK 3.6 (Release)
-
None
-
None
-
Affected OS(s): All OS Platforms
Language Found: English
Description
Sorry for not attaching example code, but the exact problem can be shown in the source code itself:
If HierarchicalViewCursor has its childNodes property set to be a ListCollectionView, and its currentChildIndex is -1, then on internal refresh, an error will be thrown that the developer cannot catch.
Error: Unknown Property: '-1'.
at mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscript/flash/proxy::getProperty()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:740]
at mx.controls.treeClasses::HierarchicalViewCursor/get current()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\controls\treeClasses\HierarchicalViewCursor.as:207]
at mx.controls.treeClasses::HierarchicalViewCursor/collectionChangeHandler()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\controls\treeClasses\HierarchicalViewCursor.as:864]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.controls.treeClasses::HierarchicalCollectionView/nestedCollectionChangeHandler()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\controls\treeClasses\HierarchicalCollectionView.as:696]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.collections::ListCollectionView/dispatchEvent()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:879]
at mx.collections::ListCollectionView/handlePropertyChangeEvents()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:1248]
at mx.collections::ListCollectionView/listChangeHandler()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:1120]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.collections::ArrayList/internalDispatchEvent()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\collections\ArrayList.as:528]
at mx.collections::ArrayList/itemUpdateHandler()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\collections\ArrayList.as:554]
HierarchicalViewCursor only catches RangeError:
public function get current():Object
{
try
{
if (childIndexStack.length == 0)
else
{ return childNodes[currentChildIndex]; } }
catch(e:RangeError)
{
}
return null;
}
ListCollectionView throws Error if index is -1:
override flash_proxy function getProperty(name:):
{
if (name is QName)
name = name.localName;
var index:int = -1;
try
catch(e:Error) // localName was not a number
{
}
if (index == -1)
{ var message:String = resourceManager.getString( "collections", "unknownProperty", [ name ]); throw new Error(message); }else
{ return getItemAt(index); }}