Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Adobe Flex SDK 4.0 (Release)
-
None
-
Affected OS(s): Mac
Affected OS(s): Mac OS 10.6
Browser: Safari
Language Found: English
Description
Summary:
Setting different source attribute values with states in a bitmapfill causes a runtime error.
Here's quick example to illustrate:
<Rect>
<fill>
<BitmapFill source.hovered="hoverImage" source.selected="selectedImage" />
</fill>
</Rect>
Haven't tested in other situations but, using the above in a list itemrenderer causes a runtime error.
Steps to reproduce:
1. Create a flex project and include the two mxml files attached
2. Replace the references to koired.jpeg and koiblue.jpeg to reference real images in your project
3. Run the application, select a list item by clicking, then click on another item
Actual Results:
Run time error:
ArgumentError: Error #2015: Invalid BitmapData.
at flash.display::BitmapData/get transparent()
at mx.graphics::BitmapFill/set source()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\graphics\BitmapFill.as:632]
at mx.states::SetProperty/setPropertyValue()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\states\SetProperty.as:454]
at mx.states::SetProperty/remove()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\states\SetProperty.as:416]
at mx.core::UIComponent/removeState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:10012]
at mx.core::UIComponent/commitCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9794]
at mx.core::UIComponent/setCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9701]
at spark.components.supportClasses::ItemRenderer/set selected()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\supportClasses\ItemRenderer.as:309]
at spark.components::List/itemSelected()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\List.as:1144]
at spark.components.supportClasses::ListBase/commitSelection()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\supportClasses\ListBase.as:1135]
at spark.components::List/commitSelection()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\List.as:1014]
at spark.components.supportClasses::ListBase/commitProperties()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\supportClasses\ListBase.as:829]
at spark.components::List/commitProperties()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\List.as:905]
at mx.core::UIComponent/validateProperties()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:7772]
at spark.components::List/item_mouseDownHandler()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\List.as:1541]
Expected Results:
No runtime error.
Workaround (if any):
Use a different coding method as outlined in the comments of the attached itemrenderer mxml file.