One of the reasons source code for Flex is available is so you can see how we do things like write item renderers. If you look closely, you'll see that the ones that extend UIComponent also implement IListItemRenderer
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Monday, March 31, 2008 9:33 AM To: [email protected] Subject: [flexcoders] Re: Custom renderer for column's header I have found the problem: Name of a class was same as the var. Now I can compile. But at run-time I am getting: Type Coercion failed: cannot convert yardmodel.modulecode::[EMAIL PROTECTED] to mx.controls.listClasses.IListItemRenderer. --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "markgoldin_2000" <[EMAIL PROTECTED]> wrote: > > I have the following code: > import mx.core.UIComponent; > public class hoursSymbolsHeaderRenderer extends UIComponent > { > public function hoursSymbolsHeaderRenderer() > { > super(); > } > > } > But when I do: > var hoursSymbolsHeaderRenderer:ClassFactory = new ClassFactory; > hoursSymbolsHeaderRenderer = new ClassFactory > (hoursSymbolsHeaderRenderer); > I get: > 1067: Implicit coercion of a value of type mx.core:ClassFactory to an > unrelated type Class. > > What am I doing wrong? > > Thanks >

