R Ravi Upra Member Licensed User Jan 7, 2020 #1 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: Jan 7, 2020
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
klaus Expert Licensed User Longtime User Jan 7, 2020 #2 You need to give more information on what you have done and how. The value I get is 1234 (0x4D2) not 1234. Click to expand... How do you get the value and how do you display it? Without seeing any code, impossible to give a concrete advice! Upvote 0
You need to give more information on what you have done and how. The value I get is 1234 (0x4D2) not 1234. Click to expand... How do you get the value and how do you display it? Without seeing any code, impossible to give a concrete advice!
DonManfred Expert Licensed User Longtime User Jan 7, 2020 #3 Where is the project showing the problem? Ravi Upra said: Is this a bug in this version? Click to expand... I believe not. I expect the problem to be in your code. Upvote 0
Where is the project showing the problem? Ravi Upra said: Is this a bug in this version? Click to expand... I believe not. I expect the problem to be in your code.
R Ravi Upra Member Licensed User Jan 7, 2020 #4 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
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
klaus Expert Licensed User Longtime User Jan 7, 2020 #5 Please post a small project showing the problem. Sorry, but with your explanation, I understand about nothing ! What is 'waste' value. What is the 'hash' value? etc. Upvote 0
Please post a small project showing the problem. Sorry, but with your explanation, I understand about nothing ! What is 'waste' value. What is the 'hash' value? etc.
DonManfred Expert Licensed User Longtime User Jan 7, 2020 #6 Ravi Upra said: I get 1234 (ox4D2) Click to expand... 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 said: I get 1234 (ox4D2) Click to expand... 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
DonManfred Expert Licensed User Longtime User Jan 7, 2020 #8 USE the log to compare the result. NOT the debugview. Read my last answer. Upvote 0
R Ravi Upra Member Licensed User Jan 7, 2020 #9 DonManfred said: 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 Click to expand... I log(waste) return 1234 Upvote 0
DonManfred said: 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 Click to expand... I log(waste) return 1234
DonManfred Expert Licensed User Longtime User Jan 7, 2020 #10 Ravi Upra said: I log(waste) return 1234 Click to expand... So in fact everything is OK. Upvote 0
R Ravi Upra Member Licensed User Jan 7, 2020 #11 DonManfred said: USE the log to compare the result. NOT the debugview. Read my last answer. Click to expand... 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 said: USE the log to compare the result. NOT the debugview. Read my last answer. Click to expand... 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.
DonManfred Expert Licensed User Longtime User Jan 7, 2020 #12 Ravi Upra said: f I use string as an example I did use waste to get the value I'm not getting 1234. Click to expand... 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 said: f I use string as an example I did use waste to get the value I'm not getting 1234. Click to expand... 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.
R Ravi Upra Member Licensed User Jan 7, 2020 #13 DonManfred said: So in fact everything is OK. Click to expand... 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
DonManfred said: So in fact everything is OK. Click to expand... 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