Hello group,
I battling with an error "invalid double "" ". In my code I'm collecting 3 numerical values in 3 labels. The values in the labels are text type. when I compute them in a variable I get a message saying " An error has occurred in sub.java.lang.NumberFormatExeption: Invalid double: "" Then it ask me if I want to continue? If I say yes and fill the 3 boxes with a numerical value the error goes away
Obviously if the label string is empty it does not compute. How can I get around that as my program will have to do a lot of math. see below the routine. Many thanks in advance
Regards,
Yves
'seconds computation
hour = lblData5.Text
minute = lblData6.Text
second = lblData7.Text
totalTimeSec = (hour *3600) + (minute*60) + second
Display_results.Text = totalTimeSec
I battling with an error "invalid double "" ". In my code I'm collecting 3 numerical values in 3 labels. The values in the labels are text type. when I compute them in a variable I get a message saying " An error has occurred in sub.java.lang.NumberFormatExeption: Invalid double: "" Then it ask me if I want to continue? If I say yes and fill the 3 boxes with a numerical value the error goes away
Obviously if the label string is empty it does not compute. How can I get around that as my program will have to do a lot of math. see below the routine. Many thanks in advance
Regards,
Yves
'seconds computation
hour = lblData5.Text
minute = lblData6.Text
second = lblData7.Text
totalTimeSec = (hour *3600) + (minute*60) + second
Display_results.Text = totalTimeSec