[Gambas-user] webform global variables

Mike Crean mike.crean at y7mail.com
Sat Apr 10 10:10:21 CEST 2021


Hi, how can I declare global variables in a WEB application.
Eg,

' Gambas class file

Export
Public Cnt As Integer

Public Sub WebForm_Open()
  Cnt = 10
End

Public Sub WebTimer1_Timer()
  Cnt = Cnt - 1
  
  If Cnt <= 0 Then
    Cnt = 10
  Endif
  
  WebLabel1.Text = Cnt
End
The above code compiles with out error. The integer is not passed to the timer function 
from Public Sub WebForm as a value of 10.
How do I implement this.
RegardsMike


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210410/36d5b8a4/attachment.htm>


More information about the User mailing list