[Gambas-user] How to get started with WebView

Rolf-Werner Eilert rwe-sse at ...3629...
Tue Jan 24 10:11:17 CET 2017


Am 23.01.2017 20:28, schrieb Benoît Minisini:
> Le 23/01/2017 à 18:41, Rolf-Werner Eilert a écrit :
>> Hi,
>>
>> I have 3.9.2 installed and started a new project as WebView project.
>>
>> Then added WebForm from the components.
>>
>> Then added a new form called Webform1.
>>
>> Then added a button, text area etc.
>>
>> When I press start, I get a Konqueror instance showing the example table
>> from the Main.webpage. But there is nothing to see from the Webform.
>>
>> I guess I have to call the Webform from the Main.webpage somehow, but
>> how? Or am I totally wrong here?
>>
>> Thanks for your insight!
>>
>> Regards
>> Rolf
>>
>
> Are you using gb.web or gb.web.form?
>
> If you use gb.web only:
>
> Remove the Main.webpage, and make your own webpage the startup form.
>
> If you have several forms, and want to decide which one to show, you
> have to create a startup module (or class), and from the Main()
> function, you have to analyze the Request object, and decide which form
> to show by calling the Render() method of the form. The Render() method
> will use the Response class to send back to the browser the page contents.
>
> Regards,
>

Thank you for the tip with the startup form. I made Webform1.webform the 
startup form, now I get a response with the webform. But I haven't tried 
Render() and Response class yet, just played around a bit with a button, 
text area and label.

Whenever I start, I get two errors in the konsole window:

gb.httpd: bind 0.0.0.0 - Address already in use
gbx3: warning: cannot switch to language 'de.UTF-8': No such file or 
directory. Did you install the corresponding locale packages?

Anything to worry about?

Regards
Rolf





More information about the User mailing list