Olhando com mais calma, ví que é o dataProvider do List que só aceita IList, enquanto o dataProvider do DataGrid aceita Object, logo o dataProvider do DataGrid aceita qualquer coisa enquanto do List não.
"The data provider for this DataGroup. It must be an IList. There are several IList implementations included in the Flex framework, including ArrayCollection, ArrayList, and XMLListCollection. This property can be used as the source for data binding." Herança: Array [image: Inheritance] Object<http://livedocs.adobe.com/flex/3/langref/Object.html> Dictionary [image: Inheritance] Object<http://docs.huihoo.com/flex/4/Object.html> ArrayCollection [image: Inheritance] ListCollectionView<http://docs.huihoo.com/flex/4/mx/collections/ListCollectionView.html> [image: Inheritance] Proxy<http://docs.huihoo.com/flex/4/flash/utils/Proxy.html> [image: Inheritance] Object <http://docs.huihoo.com/flex/4/Object.html> onde o ListCollectionView<http://docs.huihoo.com/flex/4/mx/collections/ListCollectionView.html> implementa o IList. Então pensei em continuar usando o array mesmo e ao invés de passa-lo inteiramente no construtor do ArrayList, adicionar item a item diretamente no dataProvider do List, só que, puts, o buraco é mais embaixo, não dá para percorrer um "hashtable" em actionscript? Se eu fizer: var array:Array = new Array(); array[3] = new Object(); array[9] = new Object(); array.length é = 10 Se eu fizer: var o:Object = new Object(); o[3] = new Object(); o[9] = new Object(); Não tem como percorrer. Se eu fizer: var d:Dictionary = new Dictionary(); d[3] = new Object(); d[9] = new Object(); Dictionary não tem length. Se fosse Java, eu faria: Hashtable<Number, Object> hash = new Hashtable<Number, Object>(); hash.put(3, new Object()); hash.put(9, new Object()); Onde hash.size() seria = 2. Acho que vou desistir do hashtable e usar um Array normal e fazer as buscas percorrendo o Array inteiro pelas chaves =/ -- Você recebeu esta mensagem porque está inscrito na lista "flexdev" Para enviar uma mensagem, envie um e-mail para [email protected] Para sair da lista, envie um email em branco para [email protected] Mais opções estão disponíveis em http://groups.google.com/group/flexdev
