Skip navigation
rabbit78
Currently Being Moderated

flex 4.6 DropDownList...

Jan 2, 2013 4:32 AM

hi!!!

 

i have problem with this code.....

 

private function selectItemsPlaylist2(evt:MouseEvent):void{

                                        var stat:SQLStatement = new SQLStatement();

                                        stat.sqlConnection = connection;

                                        stat.text = "SELECT id, nome, base, testo, lista FROM playlist where lista = ?";

                                        if (DropDownList.selectedItem.combo == null) {

                                                  Alert.show("Selezionare la PlayList!", "Errore");

                                        }else{

                                        stat.parameters[0] = DropDownList.selectedItem.combo;

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

  }

                              }

if don't select DropDownList, show error!!!! why???

 

help me!!!!

 
Replies
  • Currently Being Moderated
    Jan 2, 2013 4:38 AM   in reply to rabbit78

    As selected item is null so DropDownList.selectedItem will be giving u already null.

    Hence    if (DropDownList.selectedItem.combo == null) does not makes any meaning.

    Check  like:-

     

    if (DropDownList.selectedItem == null)

     

     

    It will work.

     

     

     

     

     

     

    with Regards,

    Shardul

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points