【问题标题】:How to assign a item render dynamically in flex?如何在flex中动态分配项目渲染?
【发布时间】:2012-01-13 01:02:00
【问题描述】:

我想使用如下代码更改列表的项目渲染:

booklist.itemRenderer = BookItemRender;

BookItemRender 是 s:ItemRenderer 的子类。

报错:

1067: Implicit coercion of a value of type Class to an unrelated type 

如何在代码中正确指定itemRender?

【问题讨论】:

标签: actionscript-3 apache-flex flex4.5


【解决方案1】:

你必须为此指定一个 ClassFactory 实例:

booklist.itemRenderer = new ClassFactory(BookItemRender);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-09
    相关资源
    最近更新 更多