Go Back   CodingForums.com > :: Client side development > Flash & ActionScript > Adobe Flex

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-01-2009, 05:13 PM   PM User | #1
jerry62704
Senior Coder

 
jerry62704's Avatar
 
Join Date: Oct 2007
Location: Springfield, IL
Posts: 1,049
Thanks: 9
Thanked 81 Times in 81 Posts
jerry62704 is on a distinguished road
Question Question - array

I have a class (FSL) that has various arrays with values such as:
Code:
private const englishYesNo:Array = new Array([
	"Yes",
	"No"]);
public function getEnglishYesNo():Array {
	return englishYesNo;	}

private const spanishYesNo:Array = new Array([
	"Sí",
	"No"]);
public function getSpanishYesNo():Array {
	return spanishYesNo;	}
In an actionscript file I instantiate that and then try to assign it to local variables that are bindable to mxml objects(fields). This isn't working right. Here is one of the assignments:
Code:
[Bindable] public var spanishYesNo:Array = FSL.getSpanishYesNo();
The results as seen in the variables window in debug is spanishYesNo has one array entry that has an array of two values (the yes or no values). It appears to be an array (one entry) of an array (two entries).

Needless to say, that is not what I want. How do I get it to become:
spanishYesNo[0] = "si"
spanishYesNo[1] = "no"
instead of
spanishYesNo[0][0] = "si"
spanishYesNo[0][1] = "no"
__________________
.
.
...and gladly would he learn and gladly teach

Visit www.LiberalsWin.com for humor and the unique Bush/Obama Approval Polls
jerry62704 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:32 PM.


Advertisement
Log in to turn off these ads.