Re: [Flashcoders] Custom cellRenderer for a List with XML data

2010-09-16 Thread Alexander Farber
Hello, On Wed, Sep 15, 2010 at 10:53 PM, Kerry Thompson al...@cyberiantiger.biz wrote: What you really want is something like this: games      game id=0/      game id=9012        user id=OK10218913103 name=Yervand/      /game      game id=9013        user id=OK305894249541 name=chabo/   

Re: [Flashcoders] Custom cellRenderer for a List with XML data

2010-09-16 Thread Kerry Thompson
Alexander Farber wrote: yes, I think I know that part, but my problem is how to access user attributes from the cellRenderer of the List (i.e. from its set data method) Basically, you need to pass the XML into the cellRenderer method. Or, optionally, parse the XML beforehand and put the info

Re: [Flashcoders] Custom cellRenderer for a List with XML data

2010-09-16 Thread Alexander Farber
It's a List (AS3 Flash component). Thanks, I've ended up creating an Array and filling it with XML data: private var _allDP:DataProvider = new DataProvider(); for each (var game:XML in xlist) { var obj:Object = { id: ga...@id, xml: game, len: game.elements('user').length() };

Re: [Flashcoders] Custom cellRenderer for a List with XML data

2010-09-15 Thread Alexander Farber
Hello Kerry and others, Alexander Farber wrote: http://stackoverflow.com/questions/3709172/custom-cellrenderer-for-a-list-with-xml-data thank you, I've traced the set data in debugger and its d argument is really an Object, not XML. Flash seemingly will go through all the 1st level children of

Re: [Flashcoders] Custom cellRenderer for a List with XML data

2010-09-15 Thread Kerry Thompson
Alexander Farber wrote: I've traced the set data in debugger and its d argument is really an Object, not XML. Flash seemingly will go through all the 1st level children of dataProvider's XML and create an Object for each of them with attributes as properties (and also with sub-children as

[Flashcoders] Custom cellRenderer for a List with XML data

2010-09-14 Thread Alexander Farber
Hello, I can't figure out, how to feed data to a List cellRenderer if it is in XML format. What argument will set data() receive? In the trace output I only see, that it is an object. I have prepared a simple test case demonstrating my problem (and posted a copy and screenshot at

Re: [Flashcoders] Custom cellRenderer for a List with XML data

2010-09-14 Thread Kerry Thompson
Alexander Farber wrote: I can't figure out, how to feed data to a List cellRenderer if it is in XML format. What argument will set data() receive? In the trace output I only see, that it is an object. Set a break point and look at it in the debugger. You can expand the xml tree there and see