[Gambas-user] Fwd: WebForm

Jussi Lahtinen jussi.lahtinen at gmail.com
Sun Apr 11 20:10:11 CEST 2021


Benoit, are there some limitations regarding public variables (I couldn't
find any documentation about it) or is this a bug?


Jussi

---------- Forwarded message ---------
From: Mike Crean <mike.crean at y7mail.com>
Date: Sun, Apr 11, 2021 at 7:06 AM
Subject: Re: [Gambas-user] WebForm
To: Jussi Lahtinen <jussi.lahtinen at gmail.com>
Cc: Gambas Mailing List <user at lists.gambas-basic.org>


Attached example app. on Gambas 3.15.2

Regards
Mike





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

Regards
Mike





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

Regards
Mike






----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210411/331f9575/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/331f9575/attachment-0001.gz>


More information about the User mailing list