0 Replies Latest reply on Jan 19, 2013 12:36 AM by rabbit78

    flex 4.6 mobile...problem with cicle for.....

      Hello everyone!
      I have a small problem with respect to a multi-selection of a list with a TextInput .... this is the code:

      private function createNewPlayList():void{

                                              for (var i:int = 0; i < list2.selectedItems.length; i++){

                                                        var stat:SQLStatement = new SQLStatement();

                                                        stat.sqlConnection = connection;

                                                        stat.text = "INSERT INTO playlist (nome, canzone, lista) VALUES (@nome, @canzone, @lista)";

                                                        stat.parameters["@nome"] = list2.selectedItems[i].nome;

                                                        stat.parameters["@canzone"] = list2.selectedItems[i].base;

                                                        stat.parameters["@lista"] = txtPlayList.text;

                                                        stat.execute(-1, new Responder(selectItemsPlayList));

                                                        txtErrore2.text="Base e Testo Inseriti nel Database";

                                                        txtPlayList.text= "";



      txtPlayList is name of playlist and is "one TextInput"
      Basically, with this script I do a multiselect list (and up here all ok) but what about the column "list" me only adds to the last selected list ... how do I add a lot of "list" how many are selected? ?

      I hope I was clear ....


      help me please....