Page 1 of 1
TWebView vs. TWebView2
Posted: Wed Oct 09, 2024 2:21 pm
by Ruth
Dear friends,
I have a project where this is working fine
Now I wanted to go further and use
but then it doesnt compile properly any more.... please could anyone be so kind as to point me to the missing components etc.
Also maybe someone is kind enough to tell me if this is even a good idea ... am I missing a lot if i keep on using
Kind regards to all and thank you very much in advance,
Ruth
Re: TWebView vs. TWebView2
Posted: Wed Oct 09, 2024 6:58 pm
by leandro
Ruth buenas tardes, como estas?
Desde nuestro punto de vista deberías esperar un poco a que webview2 este mas estable , nosotros también lo usamos en nuestra aplicación, hemos intentado migrar, pero hasta ahora sin éxito. Antonio, nos esta apoyando para resolver ese tema lo mas pronto que se pueda.
Por otro lado según lo que entiendo, la principal diferencia es que no necesita las librerías webview.dll y WebView2Loader.dll para funcionar.
Algo que hemos notado es que el Metodo Bind ya no esta, y la función SendToFWH viene integrada por defecto.
Como te digo es mejor esperar un poco; pero si la webview2, promete mejorar en la forma en que nos comunicamos con el navegador, ya que permite inyectar código html y evaluarlo del lado de la app.
oWebView:InjectJavascript( cJavascript() )
Ruth, good afternoon, how are you?
From our point of view you should wait a bit for webview2 to be more stable, we also use it in our application, we have tried to migrate, but so far without success. Antonio, is supporting us to resolve this issue as soon as possible.
On the other hand, from what I understand, the main difference is that it does not need the webview.dll and WebView2Loader.dll libraries to work.
Something we have noticed is that the Bind Method is no longer there, and the SendToFWH function is integrated by default.
As I say, it is better to wait a little; But webview2 promises to improve the way we communicate with the browser, since it allows html code to be injected and evaluated on the app's side.
oWebView:InjectJavascript( cJavascript() )
Re: TWebView vs. TWebView2
Posted: Thu Oct 10, 2024 12:34 am
by Lailton
Hi Ruth,
your code is correct:
do you have any error with it?
Ruth wrote:Dear friends,
I have a project where this is working fine
Now I wanted to go further and use
but then it doesnt compile properly any more.... please could anyone be so kind as to point me to the missing components etc.
Also maybe someone is kind enough to tell me if this is even a good idea ... am I missing a lot if i keep on using
Kind regards to all and thank you very much in advance,
Ruth
Re: TWebView vs. TWebView2
Posted: Thu Oct 10, 2024 12:38 am
by Lailton
Hola Leandro,
Que limitacion tiene en lo webview2?
tiene algun recurso que te falta? avisame que lo voy a revisar y implementar-lo.
Nota:
El
ja esta implementado.
leandro wrote:Ruth buenas tardes, como estas?
Desde nuestro punto de vista deberías esperar un poco a que webview2 este mas estable , nosotros también lo usamos en nuestra aplicación, hemos intentado migrar, pero hasta ahora sin éxito. Antonio, nos esta apoyando para resolver ese tema lo mas pronto que se pueda.
Por otro lado según lo que entiendo, la principal diferencia es que no necesita las librerías webview.dll y WebView2Loader.dll para funcionar.
Algo que hemos notado es que el Metodo Bind ya no esta, y la función SendToFWH viene integrada por defecto.
Como te digo es mejor esperar un poco; pero si la webview2, promete mejorar en la forma en que nos comunicamos con el navegador, ya que permite inyectar código html y evaluarlo del lado de la app.
oWebView:InjectJavascript( cJavascript() )
Ruth, good afternoon, how are you?
From our point of view you should wait a bit for webview2 to be more stable, we also use it in our application, we have tried to migrate, but so far without success. Antonio, is supporting us to resolve this issue as soon as possible.
On the other hand, from what I understand, the main difference is that it does not need the webview.dll and WebView2Loader.dll libraries to work.
Something we have noticed is that the Bind Method is no longer there, and the SendToFWH function is integrated by default.
As I say, it is better to wait a little; But webview2 promises to improve the way we communicate with the browser, since it allows html code to be injected and evaluated on the app's side.
oWebView:InjectJavascript( cJavascript() )
Re: TWebView vs. TWebView2
Posted: Thu Oct 10, 2024 7:02 am
by Antonio Linares
FWH Class TWebView2 is the way to go as we don't need any externals DLLs and we have full control over its source code!
Class TWebView2 has been developed with the help of Bruno Cantero who provided us a full understanding about it. Master Bruno!
Re: TWebView vs. TWebView2
Posted: Thu Oct 10, 2024 8:01 am
by Ruth
Dear friends,
thank you very, very much for being so helpful.
Something we have noticed is that the Bind Method is no longer there, and the SendToFWH function is integrated by default.
oWebView:InjectJavascript( cJavascript() )
This really cleared things up for me. No need to define SendToFWH in the javascript code because it is injected automatically by the webview...
Code: Select all | Expand
<button onclick='SendToFWH( 123 )'>Call FWH app from web browser</button>
And bOnBind event handler lets my Harbour program process the data received from the HTML.... I hope I understood this correctly...
Thank you
Thank you also for making it clear, dear Antonio, that TWebView2 is the way to go.
I only find
c:\fwh2023\source\classes\twebview.prg and I think this is why this doesnt compile...
Please can you point me to the download of the missing class?
What else would interest me...are there more functions injected by default like "sendtofwh"?
Again many, many thanks and kind regards,
Ruth
Re: TWebView vs. TWebView2
Posted: Thu Oct 10, 2024 8:29 am
by Antonio Linares
Dear Ruth,
You have to download FWH 24.09. Your father has the credentials to download it. I can resend them to you if needed.
Just SendToFWH() is implemented. More functions could be implemented but for now we only provide this one by default.
You are correct as bOnBind is evaluated for SendToFWH(), in the same way as bOnEval is evaluated for Method Eval( cJavascript )
There is also a bOnNavigationCompleted when a URL has been completely loaded.
Re: TWebView vs. TWebView2
Posted: Thu Oct 10, 2024 9:26 am
by Ruth
Dear Antonio,
thank you very much. I will organize the download from my father. Again...thank you
...and kind regards,
Ruth