2 Replies Latest reply on Feb 8, 2007 10:05 PM by Cheree Singal

    Add Item to list

      I'm trying to test this short example, by adobe, but it doesn't work.
      The error is: non valid metod in cart.addItem???
      Please help me..

      Tank you in advance.

      <?xml version="1.0"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
      <mx:Array id="coffeeArray">
      <label>Red Sea</label>
      <data>Smooth and fragrant</data>
      <data>Rich and pungent</data>
      <label>Blue Mountain</label>
      <data>Delicate and refined</data>
      function addToChart():void
      <mx:Panel title="La mia prima applicazione Flex" width="284" height="384">
      <mx:Label text="Coffee Blends"/>
      <mx:ComboBox id="coffeeCombo" dataProvider="{coffeeArray}" width="163"/>
      <mx:Text text="Descrizione: {coffeeCombo.selectedItem.data}"/>
      <mx:Button label="Aggiungi al Carrello" click="addToChart()"/>
      <mx:List id="cart"></mx:List>