A Arturs Member Licensed User Longtime User Oct 28, 2015 #1 Hi I have the following code: Code: Sub ast_NewText(Text As String) Log(Text) lab_test.Text = Text End Sub External device send me the following string : "TEST B4A" and in Log windows I see the received String but in lab_test (label) it is not diplayed. Where is a problem ? Regards Artur
Hi I have the following code: Code: Sub ast_NewText(Text As String) Log(Text) lab_test.Text = Text End Sub External device send me the following string : "TEST B4A" and in Log windows I see the received String but in lab_test (label) it is not diplayed. Where is a problem ? Regards Artur
DonManfred Expert Licensed User Longtime User Oct 28, 2015 #2 Arturs said: Where is a problem ? Click to expand... Maybe the missing code where we can see what you have done with lab_test and how.... Upvote 0
Arturs said: Where is a problem ? Click to expand... Maybe the missing code where we can see what you have done with lab_test and how....
A Arturs Member Licensed User Longtime User Oct 28, 2015 #3 All actions related to lab_test is only above code and Code: Sub Globals Private lab_test As Label End Sub I have created Label in Designer and that's all. Upvote 0
All actions related to lab_test is only above code and Code: Sub Globals Private lab_test As Label End Sub I have created Label in Designer and that's all.
walterf25 Expert Licensed User Longtime User Oct 28, 2015 #4 Arturs said: All actions related to lab_test is only above code and Code: Sub Globals Private lab_test As Label End Sub I have created Label in Designer and that's all. Click to expand... Is the background on your app White, if so try changing the background to any other color, or the textcolor to something else, i've seen something like this before, where i was not seeing the text on the label because my background was white and so was the text color on the label as well. Cheers, Walter Upvote 0
Arturs said: All actions related to lab_test is only above code and Code: Sub Globals Private lab_test As Label End Sub I have created Label in Designer and that's all. Click to expand... Is the background on your app White, if so try changing the background to any other color, or the textcolor to something else, i've seen something like this before, where i was not seeing the text on the label because my background was white and so was the text color on the label as well. Cheers, Walter
A Arturs Member Licensed User Longtime User Oct 28, 2015 #5 The background color is ok because if I set text in this way: lab_test.Text = "B4A TEST" then everything is ok. I only cannot see text which was received via BT bu in Log windows I see the message. EDIT: I found Why The message is not displayed From another device I send string "B4A TEST" & CRLF and the aplication goes into ast_NewText two times. First it receives my string, second Time it receives "empty" string. Why does ast_NewText even is called two times ? Last edited: Oct 28, 2015 Upvote 0
The background color is ok because if I set text in this way: lab_test.Text = "B4A TEST" then everything is ok. I only cannot see text which was received via BT bu in Log windows I see the message. EDIT: I found Why The message is not displayed From another device I send string "B4A TEST" & CRLF and the aplication goes into ast_NewText two times. First it receives my string, second Time it receives "empty" string. Why does ast_NewText even is called two times ?
walterf25 Expert Licensed User Longtime User Oct 28, 2015 #6 Arturs said: The background color is ok because if I set text in this way: lab_test.Text = "B4A TEST" then everything is ok. I only cannot see text which was received via BT bu in Log windows I see the message. Click to expand... Well then that's bizarre, are you sure the log you are seeing is the one from the ast_NewText(Text as String) Sub? Upvote 0
Arturs said: The background color is ok because if I set text in this way: lab_test.Text = "B4A TEST" then everything is ok. I only cannot see text which was received via BT bu in Log windows I see the message. Click to expand... Well then that's bizarre, are you sure the log you are seeing is the one from the ast_NewText(Text as String) Sub?
DonManfred Expert Licensed User Longtime User Oct 28, 2015 #7 Arturs said: I have created Label in Designer and that's all. Click to expand... Have you loaded the layout where the label is placed to? Without seeing code it is really hard to help Upvote 0
Arturs said: I have created Label in Designer and that's all. Click to expand... Have you loaded the layout where the label is placed to? Without seeing code it is really hard to help
A Arturs Member Licensed User Longtime User Oct 28, 2015 #8 I found Why The message is not displayed From another device I send string "B4A TEST" & CRLF and the aplication goes into ast_NewText two times. First it receives my string, second Time it receives "empty" string. If I send "B4A TEST" & CR" or "B4A TEST" & LF then everything is ok Why does ast_NewText even is called two times when I send CR and LF together? Upvote 0
I found Why The message is not displayed From another device I send string "B4A TEST" & CRLF and the aplication goes into ast_NewText two times. First it receives my string, second Time it receives "empty" string. If I send "B4A TEST" & CR" or "B4A TEST" & LF then everything is ok Why does ast_NewText even is called two times when I send CR and LF together?
Erel B4X founder Staff member Licensed User Longtime User Oct 29, 2015 #9 Are you sure that you are sending Chr(13) & Chr(10) and not the opposite? You can use the debugger to see the values you receive. Upvote 0
Are you sure that you are sending Chr(13) & Chr(10) and not the opposite? You can use the debugger to see the values you receive.
A Arturs Member Licensed User Longtime User Oct 29, 2015 #10 Erel you are right. I made a mistake I sent /n/r instead of /r/n. Now Everything is ok. I have another easy question. For example I have the below strings: S1="test1:123,test2:456" S2= "test3:4556" How to get only value behind ":" for S1 and for S2. It should be for S1 123 and 456 for S2 4556 Thank you for help Regards Artur Upvote 0
Erel you are right. I made a mistake I sent /n/r instead of /r/n. Now Everything is ok. I have another easy question. For example I have the below strings: S1="test1:123,test2:456" S2= "test3:4556" How to get only value behind ":" for S1 and for S2. It should be for S1 123 and 456 for S2 4556 Thank you for help Regards Artur
DonManfred Expert Licensed User Longtime User Oct 29, 2015 #11 Arturs said: For example I have the below strings Click to expand... For the future: - ALWAYS create a new thread for a new question. Use RegEx to split the result into parts at the comata.Split the parts you get on : and then you have the single value(s). Search forum about RegEx examples. Upvote 0
Arturs said: For example I have the below strings Click to expand... For the future: - ALWAYS create a new thread for a new question. Use RegEx to split the result into parts at the comata.Split the parts you get on : and then you have the single value(s). Search forum about RegEx examples.