This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TextInput

 
Booma Devi
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply praveen.. I solved it already... :-)
 
Booma Devi
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic