| Author |
TextInput
|
Booma Devi
Ranch Hand
Joined: Nov 02, 2011
Posts: 61
|
|
Hi,
Can any one please help me how to get the key value from the map in flex..?
I have used the property file in server side which contains the value as K=1000 B=100000. In flex side, I have red the key and value pair..
What I need this, when I type the string say 1K in the textInput, i want to retrieve the K value (1000) from the flex side...
Code is below:
|
 |
Praveen Kumar M K
Ranch Hand
Joined: Jul 03, 2011
Posts: 256
|
|
var persons:Object=event.result as Object;
for(var key:String in persons)
{
var currKey:String=key;
var currValue:Object=persons[key];
}
This looks a little strange. "persons" is a single object and its being used in a foreach loop(which doesnt make sense)..."key" in the first iteration would probably be the string representation of persons reference variable and not the 1000 that you want.
|
 |
Booma Devi
Ranch Hand
Joined: Nov 02, 2011
Posts: 61
|
|
|
Thanks for your reply praveen.. I solved it already... :-)
|
 |
Booma Devi
Ranch Hand
Joined: Nov 02, 2011
Posts: 61
|
|
Hi Praveen,
Could you please help me to solve this....
I have one textInput which allows only 10 chars... If I enter the text as 1T in spark text input then it will become 1,000.00 (here length is 8)..
My requirement is I dont want to allow the char K again in textInput because if I enter the character K then it will exceeds the maximum character... How to restrict the character K in textinput.. so that we cant
exceed the max char limit...
Thanks in Advance....
|
 |
 |
|
|
subject: TextInput
|
|
|