[Gambas-user] WebTable
Mayost Sharon
sharon at 455.co.il
Thu Apr 30 22:47:32 CEST 2020
---------- Original Message -----------
From: T Lee Davidson <t.lee.davidson at gmail.com>
To: user at lists.gambas-basic.org
Sent: Thu, 30 Apr 2020 15:17:10 -0400
Subject: Re: [Gambas-user] WebTable
> On 4/30/20 2:55 PM, Mayost Sharon wrote:
> > ---------- Original Message -----------
> > From: "Mayost Sharon" <sharon at 455.co.il>
> > To: Gambas Mailing List <user at lists.gambas-basic.org>
> > Sent: Thu, 30 Apr 2020 21:33:07 +0300
> > Subject: [Gambas-user] WebTable
> >
> >> Hello
> >>
> >> When I refresh the page (Ctrl+R Firefox)
> >> Adds duplicate columns to WebTable
> >> Attached is an example
> >>
> >> Many thanks
> > ------- End of Original Message -------
> >
> > Hello
> >
> > I see one of the examples:
> > Who used the event:
> > Public Sub _new ()
> > End
> >
> > I did put my code inside _new
> > And that fixed the problem
> >
> > Is it possible to get help for what is _new and what is the difference between an Open event
> >
> > I did not see any such event in WebForm
> >
> > Many thanks
>
> http://gambaswiki.org/wiki/cat/special
> (From the main Wiki page > Language Overviews > Special Methods)
>
> The _new special method is called when the object is created. For a form, this
> occurs prior to the form being Opened.
>
> --
> Lee
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
------- End of Original Message -------
Thanks
If so, I don't understand
How can it be that once it reaches the _NEW event the values of the controls are empty
And when it arrives at the OPEN event the values of the controls are full.
For example:
' Gambas class file
Export
Public Sub WebForm_Open()
Debug "open"
Debug WebLabel1.Text
WebLabel1.text = Val(WebLabel1.text) + 1
End
Public Sub _new()
Debug "_new"
Debug WebLabel1.Text
End
Whenever I refresh the page (Ctrl + R)
It first comes to the _NEW event and the value of WebLabel1.Text is empty
And at the end of the OPEN event, I see that WebLabel1.Text has value in it
many thanks
More information about the User
mailing list