1 Reply Latest reply on Jul 30, 2008 7:22 AM by Newsgroup_User

    AdvancedDataGridHeaderRenderer does not implement IFactory ??

    jjales
      hello

      building a custom AdvancedDataGrid, with indeed custom headerRenderer, I trying (at a first shot)
      something like :
      cc.headerRenderer = new AdvancedDataGridHeaderRenderer()

      I get an error like
      Implicit coercion of a value of typeAdvancedDataGridHeaderRenderer to an unrelated type mx.core:IFactory

      I tryied with my custom headerrenderer, that extends AdvancedDataGridHeaderRenderer and implements IFactory, and this goes ok.

      is my conclusion correct ? (AdvancedDataGridHeaderRenderer does not implement IFactory)
      and is there any reason why it should not ?

      thanks
        • 1. Re: AdvancedDataGridHeaderRenderer does not implement IFactory ??
          Level 7

          "jjales" <webforumsuser@macromedia.com> wrote in message
          news:g6ph9o$fn5$1@forums.macromedia.com...
          > hello
          >
          > building a custom AdvancedDataGrid, with indeed custom headerRenderer, I
          > trying (at a first shot)
          > something like :
          > cc.headerRenderer = new AdvancedDataGridHeaderRenderer()
          >
          > I get an error like
          > Implicit coercion of a value of typeAdvancedDataGridHeaderRenderer to an
          > unrelated type mx.core:IFactory
          >
          > I tryied with my custom headerrenderer, that extends
          > AdvancedDataGridHeaderRenderer and implements IFactory, and this goes ok.
          >
          > is my conclusion correct ? (AdvancedDataGridHeaderRenderer does not
          > implement
          > IFactory)
          > and is there any reason why it should not ?

          No, you are trying to give it an instance of AdvancedDataGridHeaderRenderer
          instead of a factory

          try:

          cc.headerRenderer = new ClassFactory(AdvancedDataGridHeaderRenderer);

          HTH;

          Amy