I have drop on a strange occurance – inserting a ButtonBar inside ListItemRenderer freeze the application. The bug is highly reproductive.
- If anyone know a workarround – it will be more than appreciated 🙂
here is a bit of the code :
<s:VGroup id="buttonHolder" visible="false" gap="0" width="100%">
<s:ButtonBar id="buttonMenu" width="100%" height="18" minWidth="100" change="buttonMenuChangeHandler(event)">
<s:dataProvider>
<s:ArrayList>
<fx:Object label="rename" icon="@Embed(source='assets/images/rename.png')"/>
<fx:Object label="delete" icon="@Embed(source='assets/images/delete.png')"/>
<fx:Object label="group +" icon="@Embed(source='assets/images/group_pluss.png')"/>
</s:ArrayList>
</s:dataProvider>
</s:ButtonBar>
</s:VGroup>
</s:VGroup>
That ‘Spark Tree’ is based on Spark List, but ListItemRenderer is an mx component. Just don’t mix those two. Use the Spark ItemRenderer instead.
The Spark and mx components have a completely different architecture, so try and avoid mixing them together, especially with such coupled components as Lists and their ItemRenderers. If you decide to go for the Spark component set, use it as extensively as you possibly can, except where there is no other way (like AdvancedDataGrid for instance). I suppose this was your intent in the first place, since you don’t seem to want to use mx:Tree.