Bonjour,

je voudrais comparer le contenu du dataprovider d'un combobox et le conteneu d'une XMLList. Voici le code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
 
 
[Bindable] public var ProduitXml : XMLList;
 
private function addPlat() : void
	{
		var arrayChild : Array = canvasCbox.getChildren();//tableau de combobox
 
		for ( var j : int =0; j<arrayChild.length; j++)
		{	
 
		   if( ProduitXml.toXMLString()==(arrayChild[j].dataProvider.toXMLString()))
			{ 
				Alert.show("ici =" + arrayChild[j].id);
				var produit : String = arrayChild[j].selectedLabel;
				if(arrayChild[j].id == "cboxOrgPlat")
					type = cboxOrgTypPlat.selectedLabel;					
				else 
			    {
			      type = arrayChild[j-1].selectedLabel;
			    }
 
				var listXml : XMLList  = ProduitXml.((attribute("product") == produit));
 
				for(var i : int =0;i<listXml.length();i++)
				{
					if(listXml[i].attribute("type")==type)
					{					  
						listPlat.push(listXml[i].@idproduit);
 
					}
				}	
 
 
 
			}
			else if(arrayChild[j].id == "cb_hd_action6")
			{
				var theme : String =  arrayChild[j].selectedLabel;
				var listXml : XMLList  = themeXML.((attribute("intitule_th") == theme));
 
				id_theme=listXml[0].@id_theme;
			}
		}
		svcInsertMenu.send();
 
	}
Merci,,