• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TextInput

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:

 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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....



 
Wait for it ... wait .... wait .... NOW! Pafiffle! A perfect tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic