Quantcast

How to get started with WebView

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to get started with WebView

Rolf-Werner Eilert-2
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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

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,

--
Benoît Minisini

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Rolf-Werner Eilert-2
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


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Benoît Minisini
Le 24/01/2017 à 10:11, Rolf-Werner Eilert a écrit :

> 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.

You are confused. I said "if you use gb.web only".

Response and Request are the low-level class of the gb.web component.

If you make a 'gb.web.form' application, you have less use of them, are
most of the things are managed directly by the gb.web.form component.

>
> 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?

The first message is not important. I didn't take the time to see why
the 'gb.httpd' component always display it.

The second message means that your web browser has requested the german
language, and that the german localization is not installed on your system.

Regards,

--
Benoît Minisini

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Rolf-Werner Eilert-2
Am 24.01.2017 10:36, schrieb Benoît Minisini:

> Le 24/01/2017 à 10:11, Rolf-Werner Eilert a écrit :
>> 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.
>
> You are confused. I said "if you use gb.web only".

Ah ok.

>
> Response and Request are the low-level class of the gb.web component.
>
> If you make a 'gb.web.form' application, you have less use of them, are
> most of the things are managed directly by the gb.web.form component.

Now I got it. When I make a gb.web.form application, I just mark one of
the forms as startup class (as I did) and add all control code for the
application there, just as I would do with a normal GUI application, right?

>
>>
>> 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?
>
> The first message is not important. I didn't take the time to see why
> the 'gb.httpd' component always display it.
>
> The second message means that your web browser has requested the german
> language, and that the german localization is not installed on your system.
>
> Regards,
>

Ok, when I press Start, Konqueror comes up, and usually I don't use that
browser. So maybe there's something wrong with it, but for the time
being I can live with it.

Regards
Rolf


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Benoît Minisini
Le 24/01/2017 à 11:24, Rolf-Werner Eilert a écrit :
>
> Now I got it. When I make a gb.web.form application, I just mark one of
> the forms as startup class (as I did) and add all control code for the
> application there, just as I would do with a normal GUI application, right?

Yes. But you must read my other posts about gb.web.form on the mailing-list!

>
> Ok, when I press Start, Konqueror comes up, and usually I don't use that
> browser. So maybe there's something wrong with it, but for the time
> being I can live with it.
>
> Regards
> Rolf
>

You can choose your browser in the IDE option dialog.

Regards,

--
Benoît Minisini

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Rolf-Werner Eilert-2

This thing is awesome, Benoit!

Am 24.01.2017 11:27, schrieb Benoît Minisini:
> Le 24/01/2017 à 11:24, Rolf-Werner Eilert a écrit :
>>
>> Now I got it. When I make a gb.web.form application, I just mark one of
>> the forms as startup class (as I did) and add all control code for the
>> application there, just as I would do with a normal GUI application, right?
>
> Yes. But you must read my other posts about gb.web.form on the mailing-list!

Well, actually I followed the discussions here over the last weeks, but
it's only now that I find the time to play around with it a bit.

Within minutes, I could group the most important elements to form
something like web version of my students database. Though the help
texts are missing, I could find most of the functionality by guessing.
It's amazing to see how communication runs from Gambas to the browser
and back.

The only thing I could not make out is how to control the tableview. As
there is no treeview and no listview, I would use tableview to replace
both of them. No real problem, but

- How can I determine the number of rows and columns
- How can I add contents
- How can I delete contents / rows

Could you explain in a few lines?

Regards
Rolf


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Benoît Minisini
Le 25/01/2017 à 15:33, Rolf-Werner Eilert a écrit :

>
> The only thing I could not make out is how to control the tableview. As
> there is no treeview and no listview, I would use tableview to replace
> both of them. No real problem, but
>
> - How can I determine the number of rows and columns
> - How can I add contents
> - How can I delete contents / rows
>
> Could you explain in a few lines?
>
> Regards
> Rolf
>

WebTableView does not store any contents. It just raises a 'Data' event
for each cell, and you must fill the 'Data' argument of the event
handler with the cell contents.

But before that, you have to define the number of rows and columns.

The number of rows is defined by the WebTableView.Count property.

The number of columns is defined by successive calls to the
WebTableView.AddColumn(<title>,[<width>,<alignment>]) method, or by
setting the WebTableVieW.Columns.Count property and the properties of
each column.

The WebTableView displays only the first 100 rows. It loads the other
rows when scrolling as needed.

If you want to add or delete rows, you have to redefine the Count
property. That will trigger a refresh, and call the Data event accordingly.

The Mode property allows to switch between no selection / single
selection / multiple selection modes.

There is no column click / sorting feature yet.

Regards,

--
Benoît Minisini

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Rolf-Werner Eilert-2
Am 25.01.2017 15:45, schrieb Benoît Minisini:

> Le 25/01/2017 à 15:33, Rolf-Werner Eilert a écrit :
>>
>> The only thing I could not make out is how to control the tableview. As
>> there is no treeview and no listview, I would use tableview to replace
>> both of them. No real problem, but
>>
>> - How can I determine the number of rows and columns
>> - How can I add contents
>> - How can I delete contents / rows
>>
>> Could you explain in a few lines?
>>
>> Regards
>> Rolf
>>
>
> WebTableView does not store any contents. It just raises a 'Data' event
> for each cell, and you must fill the 'Data' argument of the event
> handler with the cell contents.
>
> But before that, you have to define the number of rows and columns.
>
> The number of rows is defined by the WebTableView.Count property.
>
> The number of columns is defined by successive calls to the
> WebTableView.AddColumn(<title>,[<width>,<alignment>]) method, or by
> setting the WebTableVieW.Columns.Count property and the properties of
> each column.
>
> The WebTableView displays only the first 100 rows. It loads the other
> rows when scrolling as needed.
>
> If you want to add or delete rows, you have to redefine the Count
> property. That will trigger a refresh, and call the Data event accordingly.
>
> The Mode property allows to switch between no selection / single
> selection / multiple selection modes.
>
> There is no column click / sorting feature yet.
>
> Regards,
>

Thank you very much, that makes it much clearer. Now I have a Button1
and a WebTable1

Public Sub WebButton1_Click()

   WebLabel1.Text = "Button geklickt"

   WebTable1.AddColumn("Spalte 1")
   WebTable1.AddColumn("Spalte 2")
   WebTable1.Count = 5

End


Public Sub WebTable1_Data(Row As Integer, Column As Integer, Data As
WebTableData)

   Data = CStr(Row) & "-" & CStr(Column)

End

But it says "circular reference detected", and nothing appears in the
tableview. What is wrong?

Rolf


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Benoît Minisini
Le 25/01/2017 à 16:19, Rolf-Werner Eilert a écrit :

>
> Thank you very much, that makes it much clearer. Now I have a Button1
> and a WebTable1
>
> Public Sub WebButton1_Click()
>
>    WebLabel1.Text = "Button geklickt"
>
>    WebTable1.AddColumn("Spalte 1")
>    WebTable1.AddColumn("Spalte 2")
>    WebTable1.Count = 5
>
> End
>
>
> Public Sub WebTable1_Data(Row As Integer, Column As Integer, Data As
> WebTableData)
>
>    Data = CStr(Row) & "-" & CStr(Column)
>
> End
>
> But it says "circular reference detected", and nothing appears in the
> tableview. What is wrong?
>
> Rolf
>

No idea, send your project!

--
Benoît Minisini

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Rolf-Werner Eilert-2
Am 25.01.2017 16:24, schrieb Benoît Minisini:

> Le 25/01/2017 à 16:19, Rolf-Werner Eilert a écrit :
>>
>> Thank you very much, that makes it much clearer. Now I have a Button1
>> and a WebTable1
>>
>> Public Sub WebButton1_Click()
>>
>>     WebLabel1.Text = "Button geklickt"
>>
>>     WebTable1.AddColumn("Spalte 1")
>>     WebTable1.AddColumn("Spalte 2")
>>     WebTable1.Count = 5
>>
>> End
>>
>>
>> Public Sub WebTable1_Data(Row As Integer, Column As Integer, Data As
>> WebTableData)
>>
>>     Data = CStr(Row) & "-" & CStr(Column)
>>
>> End
>>
>> But it says "circular reference detected", and nothing appears in the
>> tableview. What is wrong?
>>
>> Rolf
>>
>
> No idea, send your project!
>

Ah! Now it says "Type mismatch: Wanted WebTableData, got String instead"

So, what is WebTableData?

Rolf

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Benoît Minisini
Le 25/01/2017 à 17:23, Rolf-Werner Eilert a écrit :
>
> Ah! Now it says "Type mismatch: Wanted WebTableData, got String instead"
>
> So, what is WebTableData?
>
> Rolf
>

It's the datatype of the 'Data' argument of the WebTable 'Data' event
handler.

--
Benoît Minisini

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Rolf-Werner Eilert-2
Am 25.01.2017 17:29, schrieb Benoît Minisini:

> Le 25/01/2017 à 17:23, Rolf-Werner Eilert a écrit :
>>
>> Ah! Now it says "Type mismatch: Wanted WebTableData, got String instead"
>>
>> So, what is WebTableData?
>>
>> Rolf
>>
>
> It's the datatype of the 'Data' argument of the WebTable 'Data' event
> handler.
>

Yes, but what is expected by it? How is it defined? The online help
isn't there yet ;)

I thought "put in a string, what else?" But obviously, WebTableData is
something else...

Regards
Rolf


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Benoît Minisini
Le 25/01/2017 à 17:54, Rolf-Werner Eilert a écrit :

> Am 25.01.2017 17:29, schrieb Benoît Minisini:
>> Le 25/01/2017 à 17:23, Rolf-Werner Eilert a écrit :
>>>
>>> Ah! Now it says "Type mismatch: Wanted WebTableData, got String instead"
>>>
>>> So, what is WebTableData?
>>>
>>> Rolf
>>>
>>
>> It's the datatype of the 'Data' argument of the WebTable 'Data' event
>> handler.
>>
>
> Yes, but what is expected by it? How is it defined? The online help
> isn't there yet ;)
>
> I thought "put in a string, what else?" But obviously, WebTableData is
> something else...
>
> Regards
> Rolf
>

It's an object with properties you must fill in. Use the autocompletion
to get the names of the properties.

--
Benoît Minisini

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Fabien Bodard-4
In reply to this post by Rolf-Werner Eilert-2
:-)...

I think it's like the gridview :
Data.value = CStr(Row) & "-" & CStr(Column)


Data is a class reference passed by reference.

    hData = New WebTableData
    Raise Data(iRow, iCol, hData)



from the sources i can see you can set :

.BackGround as integer
.foreground as integer
.Text as string for brut text
.Html for interpreted html



2017-01-25 17:54 GMT+01:00 Rolf-Werner Eilert <[hidden email]>:

> Am 25.01.2017 17:29, schrieb Benoît Minisini:
>> Le 25/01/2017 à 17:23, Rolf-Werner Eilert a écrit :
>>>
>>> Ah! Now it says "Type mismatch: Wanted WebTableData, got String instead"
>>>
>>> So, what is WebTableData?
>>>
>>> Rolf
>>>
>>
>> It's the datatype of the 'Data' argument of the WebTable 'Data' event
>> handler.
>>
>
> Yes, but what is expected by it? How is it defined? The online help
> isn't there yet ;)
>
> I thought "put in a string, what else?" But obviously, WebTableData is
> something else...
>
> Regards
> Rolf
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Fabien Bodard

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Fabien Bodard-4
In reply to this post by Benoît Minisini
OUPS I think it's like the gridview :
Data.Text = CStr(Row) & "-" & CStr(Column)

2017-01-25 17:58 GMT+01:00 Benoît Minisini <[hidden email]>:

> Le 25/01/2017 à 17:54, Rolf-Werner Eilert a écrit :
>> Am 25.01.2017 17:29, schrieb Benoît Minisini:
>>> Le 25/01/2017 à 17:23, Rolf-Werner Eilert a écrit :
>>>>
>>>> Ah! Now it says "Type mismatch: Wanted WebTableData, got String instead"
>>>>
>>>> So, what is WebTableData?
>>>>
>>>> Rolf
>>>>
>>>
>>> It's the datatype of the 'Data' argument of the WebTable 'Data' event
>>> handler.
>>>
>>
>> Yes, but what is expected by it? How is it defined? The online help
>> isn't there yet ;)
>>
>> I thought "put in a string, what else?" But obviously, WebTableData is
>> something else...
>>
>> Regards
>> Rolf
>>
>
> It's an object with properties you must fill in. Use the autocompletion
> to get the names of the properties.
>
> --
> Benoît Minisini
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Fabien Bodard

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Rolf-Werner Eilert-2
In reply to this post by Benoît Minisini
Am 25.01.2017 17:58, schrieb Benoît Minisini:

> Le 25/01/2017 à 17:54, Rolf-Werner Eilert a écrit :
>> Am 25.01.2017 17:29, schrieb Benoît Minisini:
>>> Le 25/01/2017 à 17:23, Rolf-Werner Eilert a écrit :
>>>>
>>>> Ah! Now it says "Type mismatch: Wanted WebTableData, got String instead"
>>>>
>>>> So, what is WebTableData?
>>>>
>>>> Rolf
>>>>
>>>
>>> It's the datatype of the 'Data' argument of the WebTable 'Data' event
>>> handler.
>>>
>>
>> Yes, but what is expected by it? How is it defined? The online help
>> isn't there yet ;)
>>
>> I thought "put in a string, what else?" But obviously, WebTableData is
>> something else...
>>
>> Regards
>> Rolf
>>
>
> It's an object with properties you must fill in. Use the autocompletion
> to get the names of the properties.
>

Ok, Data.Text did the job :)

Rolf


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Rolf-Werner Eilert-2
In reply to this post by Fabien Bodard-4
Yes, you are right, thank you!

Sometimes I do not see the forest for all the trees :)

Rolf

Am 25.01.2017 18:01, schrieb Fabien Bodard:

> OUPS I think it's like the gridview :
> Data.Text = CStr(Row) & "-" & CStr(Column)
>
> 2017-01-25 17:58 GMT+01:00 Benoît Minisini <[hidden email]>:
>> Le 25/01/2017 à 17:54, Rolf-Werner Eilert a écrit :
>>> Am 25.01.2017 17:29, schrieb Benoît Minisini:
>>>> Le 25/01/2017 à 17:23, Rolf-Werner Eilert a écrit :
>>>>>
>>>>> Ah! Now it says "Type mismatch: Wanted WebTableData, got String instead"
>>>>>
>>>>> So, what is WebTableData?
>>>>>
>>>>> Rolf
>>>>>
>>>>
>>>> It's the datatype of the 'Data' argument of the WebTable 'Data' event
>>>> handler.
>>>>
>>>
>>> Yes, but what is expected by it? How is it defined? The online help
>>> isn't there yet ;)
>>>
>>> I thought "put in a string, what else?" But obviously, WebTableData is
>>> something else...
>>>
>>> Regards
>>> Rolf
>>>
>>
>> It's an object with properties you must fill in. Use the autocompletion
>> to get the names of the properties.
>>
>> --
>> Benoît Minisini
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Gambas-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get started with WebView

Rolf-Werner Eilert-2
In reply to this post by Benoît Minisini
Am 25.01.2017 16:24, schrieb Benoît Minisini:

> Le 25/01/2017 à 16:19, Rolf-Werner Eilert a écrit :
>>
>> Thank you very much, that makes it much clearer. Now I have a Button1
>> and a WebTable1
>>
>> Public Sub WebButton1_Click()
>>
>>     WebLabel1.Text = "Button geklickt"
>>
>>     WebTable1.AddColumn("Spalte 1")
>>     WebTable1.AddColumn("Spalte 2")
>>     WebTable1.Count = 5
>>
>> End

I found that each time I start, Firefox will have a new tab with old
values kept, i. e. each start produces another two columns:

1 2 1 2 1 2

So I added

        WebTable1.Columns.Count = 0

before the lines adding the columns. Now the program crashed saying "Out
of array"

When I use Konqueror, the browser will start all over each time, causing
no problem.

Obviously, in Firefox the Data event is called when the page is rendered
for the first time, just like GridView does. But even when I leave away
the line, Konqueror will run as expected: only calling the Data event
when the Button1 is pressed.

Strange, isn't it?

Rolf


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Loading...