[Gambas-user] WebForm

Mike Crean mike.crean at y7mail.com
Sun Apr 11 04:26:53 CEST 2021


PS it would seem that Cnt has been declared as a global integer but is not incremental each time the timer fires (if the timer is firing!) it would seem it is as the time displayed is incremented.
RegardsMike



 

    On Sunday, 11 April 2021, 10:18:07 am AWST, Mike Crean via User <user at lists.gambas-basic.org> wrote:  
 
 OK in version 3.15.2 the timer is set to true. My problem is how do I make an Integer public to all functions in a WebForm class.Cnt will not continue to increment each time the timer fires. The code below is taken from opening a new Web form application and modifying the example code.

Eg.
' Gambas class file

Export
Public Cnt As Integer

Public Sub WebForm_Open()
 WebTimer1_Timer
End

Public Sub WebTimer1_Timer()
  WebLabel1.Text = Format(Now, "hh:nn:ss")
  Inc Cnt
  Cnt = Cnt + 1
  WebLabel2.Text = Cnt
End
RegardsMike



 

    On Sunday, 11 April 2021, 2:59:35 am AWST, Jussi Lahtinen <jussi.lahtinen at gmail.com> wrote:  
 
 Can you send the isolated problem as a project?
Jussi

On Sat, Apr 10, 2021 at 11:35 AM Mike Crean via User <user at lists.gambas-basic.org> wrote:

In the following code the WebTimer is not set to True when the code is executed !!Why??
' Gambas class file
Export
Public Cnt As Integer
Public Sub WebForm_Open()
  WebTimer1.Enabled = True
End
Public Sub WebTimer1_Timer()
  Cnt = Cnt + 1  
  WebLabel1.Text = Cnt
End
RegardsMike






----[ http://gambaswiki.org/wiki/doc/netiquette ]----

  
----[ http://gambaswiki.org/wiki/doc/netiquette ]----
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210411/b5ef3169/attachment-0001.htm>


More information about the User mailing list