Reputation: 672
I want to change a list's item render with code like this:
booklist.itemRenderer = BookItemRender;
BookItemRender is a subclass of s:ItemRenderer.
It report error:
1067: Implicit coercion of a value of type Class to an unrelated type
How to correctly specify a itemRender in code?
Upvotes: 1
Views: 189
Reputation: 7895
You have to specify a ClassFactory instance for this:
booklist.itemRenderer = new ClassFactory(BookItemRender);
Upvotes: 3