Hi all,

I'm trying to fill a List component with an array wich doesn't have a
'label' field so I'm using dataTipField property to set which is the
attribute to use.

Here's the code:

<code>
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
      creationComplete="init()">
      <mx:Script>
            <![CDATA[
                  [Bindable]
                  public var tipos:Array;
                 
                  public function init() {
                        tipos = new Array();
                        tipos.push ({a:"a",b:"b"});
                        tipos.push ({a:"aa",b:"bb"});
                        tipos.push ({a:"aaa",b:"bbb"});
                        myList.dataProvider = tipos;
                  }
            ]]>
      </mx:Script>
      <mx:List id="myList" dataProvider="{tipos}" dataTipField="a"/>
</mx:Application>
</code>

Instead of displaying a, aa and aaa the lists displays 3 items with
Object Object.

I'm doing something wrong?

Thx
X.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to