1 Reply Latest reply on Apr 4, 2007 7:49 AM by Ensadragon

    Type mismatch error

    Ensadragon
      Hello,

      I'm trying to instantiate a Flexstore2 component (ProductCatalogPanel.mxml) in AS3 rather than MXML.

      However, I'm getting a type mismatch error when I attempt the AS3 data binding.

      - - - - - - - - - - - - start code snippet - - - - - - - - - - - - - - -

      Original MXML instantiation in ProductsView.mxml

      <productsView:ProductCatalogPanel id="catalogPanel"
      catalog="{catalog}"

      ... plus some event stuff I don't need for now ...
      >

      My AS3 instantiation in ProductsView.mxml

      import mx.binding.utils.BindingUtils;

      private var catalogPanel:ProductCatalogPanel;

      private function creationCompleteHandler():void {
      catalogPanel = new ProductCatalogPanel();
      BindingUtils.bindSetter(catalogPanel, "catalog", "catalog");
      this.addChild(catalogPanel);
      }

      - - - - - - - - - - - - end code snippet - - - - - - - - - - - - - - -

      I've spent a while trying to figure this out myself, been through all of the relevant quickstarts, and searched the forum for similar postings with no success.

      Can anyone help, either with specific advice RE the inner workings of Flexstore2, or more general data binding hints?

      Many thanks, Rich