1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| [Bindable]private var besoins:ArrayCollection = new ArrayCollection();
private function A():void{
//création tablo()
sqls =new SQLStatement();
sqls.sqlConnection = sqlc;
sqls.text = "select num_besoinF,cparateur,lbl_comm,marg,qte from JOINT_PARAM where num_profil=1 and num_patho=1;";
sqls.execute();
sqls.addEventListener(SQLEvent.RESULT, B);
C(tablo);
}
private function B(e:SQLEvent):void
{
var data:Array = sqls.getResult().data;
besoins = new ArrayCollection(data);
}
private function C(tablo:Array):void{
var bes:uint;
bes=besoins.length;
Alert.show(""+bes);
//Me renvoie 0 alors que si je mets ce code dans B, me renvoie 41
} |