Actionscript 3 如何在flex中动态指定项目渲染?
我想用如下代码更改列表的项目渲染:Actionscript 3 如何在flex中动态指定项目渲染?,actionscript-3,apache-flex,flex4.5,Actionscript 3,Apache Flex,Flex4.5,我想用如下代码更改列表的项目渲染: booklist.itemRenderer = BookItemRender; BookItemRender是s:ItemRenderer的一个子类 It报告错误: 1067: Implicit coercion of a value of type Class to an unrelated type 如何在代码中正确指定itemRender?必须为此指定ClassFactory实例: booklist.itemRenderer = new Class
booklist.itemRenderer = BookItemRender;
BookItemRender是s:ItemRenderer的一个子类
It报告错误:
1067: Implicit coercion of a value of type Class to an unrelated type
如何在代码中正确指定itemRender?必须为此指定ClassFactory实例:
booklist.itemRenderer = new ClassFactory(BookItemRender);
可能重复