Hi All,
First im a noob with 48 hours experience using the trial version of B4A.
I am having a problem making 4 buttons visible/invisible at run time. If I just use one button in my program then everything works fine, if more than one then I get a compile error……………..
Compiling code. Error
Error parsing program.
Error description: Undeclared variable 'btnhourdec' is used before it was assigned any value.
Occurred on line: 56
btnHourDec.Visible = False
The buttons are declared here……………….
Sub Globals
Dim btnHourInc As Button
Dim btnHoursDec As Button
Dim btnMinsDec As Button
Dim btnMinsInc As Button
End Sub
And used here………………………………………
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
'Iniz Timer1 for clock update
If FirstTime Then
Timer1.initialize("Timer1", 1000)
Timer1.Enabled = True
End If
btnHourInc.Visible = False
btnHourDec.Visible = False
'btnHourDec.Visible = False
'btnMinInc.Visible = False
'btnMinDec.Visible = False
'pnlAlarmEdit.Visible = False
'lblAlarm1Start.Visible = False
End Sub
Any idea’s?
Thanks
First im a noob with 48 hours experience using the trial version of B4A.
I am having a problem making 4 buttons visible/invisible at run time. If I just use one button in my program then everything works fine, if more than one then I get a compile error……………..
Compiling code. Error
Error parsing program.
Error description: Undeclared variable 'btnhourdec' is used before it was assigned any value.
Occurred on line: 56
btnHourDec.Visible = False
The buttons are declared here……………….
Sub Globals
Dim btnHourInc As Button
Dim btnHoursDec As Button
Dim btnMinsDec As Button
Dim btnMinsInc As Button
End Sub
And used here………………………………………
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
'Iniz Timer1 for clock update
If FirstTime Then
Timer1.initialize("Timer1", 1000)
Timer1.Enabled = True
End If
btnHourInc.Visible = False
btnHourDec.Visible = False
'btnHourDec.Visible = False
'btnMinInc.Visible = False
'btnMinDec.Visible = False
'pnlAlarmEdit.Visible = False
'lblAlarm1Start.Visible = False
End Sub
Any idea’s?
Thanks