언어 설정

Menu
Sites
Language
Check if the user has entered something in EditField

Hi,

How am i supposed to check if the user has entered any number in an EditField? For this purpose i have used the Tizen::Base::String GetText(void) const        function. But the problem comes when the function returns some values like 3 or 6..etc which are very usual on the part of the user to enter and as such my checks are not working fine in those cases.

Can i use any other alternative function to work in this situation?

The following is the code that i have used if it is of some help:

    int num;
    Integer::Parse(pField[i][j]->GetText(), num);
    if((pField[i][j]->IsKeypadEnabled()) && (num >= 1 && num <= 9))
            {....//do somthing.....}
    else {....//do something else...}

Thanks in advance.

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

1 댓글
wil smith
You can use the EditField's event listeners. In callback method you can parse the string if you are interested with numbers.