Wish common mistakes

hookshy

Well-Known Member
Licensed User
Longtime User
http://www.b4x.com/android/forum/threads/video-common-mistakes.30336/#content

Upon Erel's video I will propose a new subject on common mistakes .
We build nice app with the powerfull b4a and for some reason as you get tired programing day and night you make basic mistakes .

A service module crashed with force close message all the time when by mistake one of process variable declared as boolean got a value of an interger.
You may want to check you variable declaration and asignement otherwise your brain will crash eventually!

B4X:
Sub Process_Globals
  Dim boolvar As Int
end sub

Sub Service_Start
If condition=true Then
' code executed most of time
Else
'you forgot to test this section of your program
boolvar=0  
End If
end sub
 
Top