Try setting the labelField=”0”.

This is because the List by default expects an array of objects, each with a ”label” property.  In the case of a scalar array, you need to specify the array “column”.  If it was a 2d array, you could display any column in the list.

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of Richard Hoska
Sent: Thursday, December 22, 2005 12:04 PM
To: [email protected]
Subject: Re: [flexcoders] Array declaration problem

 

I went into my .cfc and removed the embedded quotes, so now my string looks like 'foo,morefoo,morefoo'.  now flex seems to be rendering the correct number of spaces in the drop down box but the text is not showing. 

thanks for helping me out with this,
~RH

On 12/21/05, Tracy Spratt <[EMAIL PROTECTED]> wrote:

With the embedded quotes, huh?  You might have to process the string a bit more then.  Experiment with split. You have several options, strip out all the quotes (that would probably be my choice but I'd need to experiment), strip off the beginning and end quotes and use '", "' as the delimiter , or even handle the quotes in each individual element.

 

Here is a handy search/replace function:

 

private function replace(sString:String, sFind:String, sReplace:String):String

{

  return sString.split( sFind ).join( sReplace );      

}

 

Tracy


From: [email protected] [mailto:[email protected]] On Behalf Of Richard Hoska
Sent: Tuesday, December 20, 2005 3:36 PM
To: [email protected]
Subject: Re: [flexcoders] Array declaration problem

 

the cfc is passing this back "foo", "morefoo", "evenmore", "etc"

On 12/20/05, Tracy Spratt < [EMAIL PROTECTED]> wrote:

What does the string look like?  You can use split() to create an array
from a delimited string.

Tracy

-----Original Message-----
From: [email protected] [mailto: [email protected]] On
Behalf Of rhoska
Sent: Tuesday, December 20, 2005 2:04 PM
To: [email protected]
Subject: [flexcoders] Array declaration problem


Newbie question of the week here but...

I'm working with iteration two's ComboBoxCellRender from
http://www.richinternetapps.com/archives/000072.html. 

I want to replace the array declaration of the
ComboBoxCellRenderer.dataProvider = ["foo", "more foo"] with a string
I am pulling from a cfc by JobList.getJobs() and for the life of me I
can't get it to populate.

If anyone could help me out with the syntax I would be greatly
appreciative.

~RH







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











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


YAHOO! GROUPS LINKS

 

 


SPONSORED LINKS

Web site design development

Computer software development

Software design and development

Macromedia flex

Software development best practice

 

 


YAHOO! GROUPS LINKS

 

 






--
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