timer declaration?
Posted: Tue Jan 25, 2011 5:39 pm
Can anyone explain why the compiler is giving me grief here?
It says that :
gTimer.Enabled not declared/unknown
on the line in the sub (which is an event handler) where the .enabled is set to false
many thanks
dim gTimer as timer
dim buttonPressed as integer
sub handleOneSecondTick
` Handles the timer click every second.
gTimeLeft = gTimeLeft - 1
` If the timer has expired - disable all buttons, stop the timer
if (gTimeLeft = 0) then
gTimer.Enabled = false
end if
end sub
It says that :
gTimer.Enabled not declared/unknown
on the line in the sub (which is an event handler) where the .enabled is set to false
many thanks
dim gTimer as timer
dim buttonPressed as integer
sub handleOneSecondTick
` Handles the timer click every second.
gTimeLeft = gTimeLeft - 1
` If the timer has expired - disable all buttons, stop the timer
if (gTimeLeft = 0) then
gTimer.Enabled = false
end if
end sub