[Gambas-user] WebForm

Mike Crean mike.crean at y7mail.com
Sun Apr 11 06:05:52 CEST 2021


Attached example app. on Gambas 3.15.2
RegardsMike



 

    On Sunday, 11 April 2021, 11:07:59 am AWST, Jussi Lahtinen <jussi.lahtinen at gmail.com> wrote:  
 
 Please send a runnable project.
Jussi

On Sun, Apr 11, 2021 at 5:17 AM Mike Crean <mike.crean at y7mail.com> 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 ]----

  
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210411/f90f15ae/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WEBtimerTest.tar.gz
Type: application/gzip
Size: 12689 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210411/f90f15ae/attachment-0001.gz>


More information about the User mailing list