ListItemRenderer 内的 Flex ButtonBar 会冻结应用程序吗?
我遇到了一个奇怪的现象 - 在 ListItemRenderer 中插入 ButtonBar 会冻结应用程序。该虫子的繁殖力很强。
- 如果有人知道解决方法 - 我们将非常感激:)
这里是一些代码:
<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>
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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该“Spark Tree”基于 Spark List,但 ListItemRenderer 是一个 mx 组件。只是不要混淆这两者。请改用 Spark ItemRenderer。
Spark 和 mx 组件具有完全不同的架构,因此请尽量避免将它们混合在一起,特别是对于列表及其 ItemRenderer 等耦合组件。如果您决定使用 Spark 组件集,请尽可能广泛地使用它,除非没有其他方法(例如 AdvancedDataGrid)。我想这首先是您的意图,因为您似乎不想使用 mx:Tree。
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.