Android Question Edittext

Ravi Upra

Member
Licensed User
Hi I'm using B4A 9.50. In designer I added Edittext1 and set input type as TEXT.
when I run the program and enter 1234 and use string variable to capture EdiText1.text .
The value I get is 1234 (0x4D2) not 1234. How to get text of "1234".
Please help.Is this a bug in this version? I never had this problem before.
Regards
 
Last edited:

klaus

Expert
Licensed User
Longtime User
You need to give more information on what you have done and how.
The value I get is 1234 (0x4D2) not 1234.
How do you get the value and how do you display it?
Without seeing any code, impossible to give a concrete advice!
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Where is the project showing the problem?
Is this a bug in this version?
I believe not. I expect the problem to be in your code.
 
Upvote 0

Ravi Upra

Member
Licensed User
this is my simple code
Dim waste As String = EditText1.Text
and I put debug to stop on this line and just move mouse on top to check waste value.
My problem is that waste will contain the password that will be hash and compare with the password in database.
I get not equal all the time.So I did debug to this line and found out that instead of getting just 1234 I get 1234 (ox4D2)
But on mobile I just press 1234
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I get 1234 (ox4D2)
The String value is "1234". In debug the result is parsed as a number too (the 0x4D2).
B4X:
Dim waste As String = EditText1.Text
' What does the next line output in log?
log(waste) ' I expect to to get 1234 in the log
 
Upvote 0

Ravi Upra

Member
Licensed User
USE the log to compare the result. NOT the debugview. Read my last answer.
I use log I get 1234 .if I use string as an example I did use waste to get the value I'm not getting 1234. I'm still getting 1234 (Ox4D2). As I need to pass this value to do hashing function so the value I get back from hashing function is different from the real hashing value of 1234.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
f I use string as an example I did use waste to get the value I'm not getting 1234.
I do not believe! Proof it!

Upload a small project which shows the problem. I do not expect any problem with the returnvalue from
B4X:
Dim waste As String = EditText1.Text

The String is never 0x4D2! The String is "1234"
0x4D2 is the Numeric value of the String "1234". And, again, this is an DEBUG-Output.
 
Upvote 0

Ravi Upra

Member
Licensed User
So in fact everything is OK. :cool:
Hi DonManfred thank you for your help it was my big fault. You're right. I found that by mistake I added SALT to my hashing function, which make the value not the same as before and I thought the problem was from here. Thank you again :):)
 
Upvote 0
Top