I may be misunderstanding your code, but why this
else if (regex_match(iNbr, isI))
instead of something like this?
else if (regex_match(e.text.unicode, isI))
What a gross mistake!
You were right! It was the main problem! xP
Well, even then I had other problems: when I replaced "iNbr" by "e.text.unicode", occurred an incompatibility problem. So I tried to use isdigit again. I'd tried to use isdigit before, but the same problem (text box froze) had happened. That was happening because I was committing the same mistake writing isdigit(iNbr). Then, I did this:
[...]
} else {
string check = "";
check += e.text.unicode; //key pressed is armazenated in check.
//if check is a digit, its value is added to iNbr:
if (isdigit(check)){
iNbr += check;
n.setString(iNbr);
}
}
[...]
But another problem occurred: isdigit only accepts char. Nevertheless, it was easy to fix:
[...]
} else {
char check = '\0';
check += e.text.unicode; //key pressed is armazenated in check.
//if check is a digit, its value is added to iNbr:
if (isdigit(check)){
iNbr += check;
n.setString(iNbr);
}
}
[...]
Now it's working! ><'
Well, thank you very much. You all helped me a lot
o/