E Erfan Kakaei New Member Jul 18, 2019 #1 Hello, I was wondering if anyone could help me with this. My app compiles just fine, but when I click on any button within it, it just stops and exits. P.S: The only code within the mentioned buttons is to change the text inside a label. As in: Code: Copy label.Text = "1"
Hello, I was wondering if anyone could help me with this. My app compiles just fine, but when I click on any button within it, it just stops and exits. P.S: The only code within the mentioned buttons is to change the text inside a label. As in: Code: Copy label.Text = "1"
DonManfred Expert Licensed User Longtime User Jul 19, 2019 #2 Erfan Kakaei said: it just stops and exits Click to expand... Check the log and post the full error. Without it is hard to give any advice. If you have a small testproject. Upload it. In the IDE use File->Export as zip and upload this zip. Upvote 0
Erfan Kakaei said: it just stops and exits Click to expand... Check the log and post the full error. Without it is hard to give any advice. If you have a small testproject. Upload it. In the IDE use File->Export as zip and upload this zip.
mangojack Expert Licensed User Longtime User Jul 19, 2019 #3 I will take a wild shot ... Should the above code be Label1.Text = "1" If this does not solve you problem ... follow @DonManfred instructions so we can help you further . Upvote 0
I will take a wild shot ... Should the above code be Label1.Text = "1" If this does not solve you problem ... follow @DonManfred instructions so we can help you further .
E Erfan Kakaei New Member Jul 19, 2019 #4 DonManfred said: Check the log and post the full error. Without it is hard to give any advice. If you have a small testproject. Upload it. In the IDE use File->Export as zip and upload this zip. Click to expand... Well unfortunately I don't have access to the logs, but yes my project is small. Here it is: Attachments Calculator.zip Calculator.zip 10.3 KB · Views: 533 Upvote 0
DonManfred said: Check the log and post the full error. Without it is hard to give any advice. If you have a small testproject. Upload it. In the IDE use File->Export as zip and upload this zip. Click to expand... Well unfortunately I don't have access to the logs, but yes my project is small. Here it is:
E Erfan Kakaei New Member Jul 19, 2019 #5 mangojack said: I will take a wild shot ... Should the above code be Label1.Text = "1" If this does not solve you problem ... follow @DonManfred instructions so we can help you further . Click to expand... Thank you sir, I just did. Upvote 0
mangojack said: I will take a wild shot ... Should the above code be Label1.Text = "1" If this does not solve you problem ... follow @DonManfred instructions so we can help you further . Click to expand... Thank you sir, I just did.
DonManfred Expert Licensed User Longtime User Jul 20, 2019 #6 Erfan Kakaei said: Well unfortunately I don't have access to the logs Click to expand... Connect your device with usb and use USB Debugging. It will list the log. The Error is "Empty String" in a math calculation In fact it is this code from you. Code: Copy lblSum.Text = lblSum.Text + "0" lblSum is empty at start. You are trying to do a math operation here. add 0 to lblSum.Text. To concat the value of lblSum.Text and the 0 (when pressing Button "1" seems wrong to me. Code: Copy lblSum.Text = lblSum.Text & "0" This was the case in all buttons. Please find a slightly changes example. i have changed - all occurances of Code: Copy lblSum.Text = lblSum.Text + "0" with Code: Copy lblSum.Text = lblSum.Text & "0" to concat the String. - all other numberbuttons other than the 0 to match the right number. You did used 0 in all... Attachments calcnew.zip calcnew.zip 10.4 KB · Views: 494 Upvote 0
Erfan Kakaei said: Well unfortunately I don't have access to the logs Click to expand... Connect your device with usb and use USB Debugging. It will list the log. The Error is "Empty String" in a math calculation In fact it is this code from you. Code: Copy lblSum.Text = lblSum.Text + "0" lblSum is empty at start. You are trying to do a math operation here. add 0 to lblSum.Text. To concat the value of lblSum.Text and the 0 (when pressing Button "1" seems wrong to me. Code: Copy lblSum.Text = lblSum.Text & "0" This was the case in all buttons. Please find a slightly changes example. i have changed - all occurances of Code: Copy lblSum.Text = lblSum.Text + "0" with Code: Copy lblSum.Text = lblSum.Text & "0" to concat the String. - all other numberbuttons other than the 0 to match the right number. You did used 0 in all...
E Erfan Kakaei New Member Jul 20, 2019 #7 Thank you very much sir, it's been solved. Now could you please tell me how I can set a number variable to Null? For example let's say there's an integer with the value 4 inside it, and i'd like to have it empty as if it was just created. And is the method the same as setting a string to Null? Upvote 0
Thank you very much sir, it's been solved. Now could you please tell me how I can set a number variable to Null? For example let's say there's an integer with the value 4 inside it, and i'd like to have it empty as if it was just created. And is the method the same as setting a string to Null?
Erel B4X founder Staff member Licensed User Longtime User Jul 21, 2019 #8 A number variable can never be Null. It is also a mistake to set a string variable to null. Upvote 0