WebForm weird behaviour ... or not !!!

For questions about Gambas web tools.
Post Reply
dockfo
Posts: 7
Joined: Monday 7th March 2022 5:38pm

WebForm weird behaviour ... or not !!!

Post by dockfo »

Hi It's me again.
I hope everyone is doing well. I have another question relative to WebForms. Could someone please explain me what is the concept behind the WebForm Class and what is the proper use of it? I mean how to instantiate them how to get from one to another etc. I am asking this because (obviously I haven't find any documentation) I am trying to write an web based application with the use of WebForm and I am getting some weird results. First of all I am treating the different forms of my project as different web pages ( as if I was using html or php pages) so I am navigating through them with the static goto() method. The thing is that only the first form that loads has all the functionality of a WebForm Class. I mean that if my application starts with the form 'StartForm' and I navigate to 'SecondForm' with the '.Goto' method or .'Current' property I lose the '_KeyPress' event in the 'SecondForm', the method ShowModal() is not working etc. In contrary when I start from 'StartForm' and embed the 'SeconForm' inside the "StartForm' (instantiated with the _new command) everything is working great in the 'SecondForm'. Why is this happening? Obviously I didn't understand the concept behind WebForm. Another thing that I have noticed is that when using the HttpClient Class (from curl component) in asynchronous mode the event _Finished does not automatically refresh the corresponding content of my form (as if the code inside the sub was not being executed) until I press a mouse button anywhere in the form, then the code inside the event is executed and the corresponding part of my form is refreshed. I found a solution with using a main bootstrap form and everything else is embedded inside it but it very soon became very complicated so I am not confident that I am walking in the proper path. This weird behavior is driving me crazy...
Thanks in advance for the reply.
rj71
Posts: 27
Joined: Thursday 13th April 2023 6:39pm

Re: WebForm weird behaviour ... or not !!!

Post by rj71 »

New Gambas user here and was wondering the same thing as your question. Did you ever figure this out?
Post Reply