FYI manual code entry vs copy and paste

jschuchert

Active Member
Licensed User
Longtime User
Maybe some of you have already experienced this but I just spent an hour and a half trying to figure out why code I copied and pasted wouldn't work when it did in the place from which it came. In desperation, I deleted the copied and pasted stuff and manually typed it in, NOW IT WORKS! It seems like this happened once before but it was a long time ago. Fortunately, it is only a rare occurrence. So..if everything else fails try it.

Jim S.
 

jschuchert

Active Member
Licensed User
Longtime User
I have no idea. I was trying to delete the decimal but the code would not do it until I deleted and re-typed it. However, it worked fine for another edittext.
I re-typed the first 6 lines.

B4X:
Sub txtangle_FocusChanged(HasFocus As Boolean)
If HasFocus =False Then
Main.strbearing=txtangle.Text  'value containing decimal
If Main.strbearing.IndexOf (".")>0 Then  'test for decimal
Main.strbearing=Main.strbearing.Replace (".","") 'delete the decimal
End If
.
.
.
.
End If
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…