1

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?

ketan
  • 19,129
  • 42
  • 60
  • 98
Spark
  • 652
  • 3
  • 9
  • 19

1 Answers1

3

You have to specify a ClassFactory instance for this:

booklist.itemRenderer = new ClassFactory(BookItemRender);
dtuckernet
  • 7,817
  • 5
  • 39
  • 54