Queremos mostrar un html local en webview, pero no logramos hacer que funcione, nos basamos en el ejemplo webviewuni.prg, para tratar de halar el archivo desde el disco duro, pero no logramos hacer que funcione.
webview3.prg
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
聽 聽local oWebView := TWebView():New()
聽 聽oWebView:bOnBind = { | cJson, nCalls | MsgInfo( cJson, nCalls ) }
聽 聽oWebView:Bind( "SendToFWH" )
聽 聽oWebView:Navigate( Html() )
聽 聽Sleep( 200 )
聽 聽oWebView:Run()
聽 聽oWebView:Destroy()
return nil
//----------------------------------------------------------------------------//
function Html()
聽 聽local cHtml := memoread(".\index.html")
聽 聽//memoedit(cHtml)
return cHtml
//----------------------------------------------------------------------------//<html>
聽<head>
聽</head>
聽<body style="background-color:cyan">
聽 聽 <h2>Using WebView from FWH</h2>
聽 聽 <button onclick='SendToFWH( 123 )'>Call FWH app from web browser</button>
聽 聽 <button onclick='SendToFWH( 456 )'>Test 2</button>
聽 聽 <button onclick='SendToFWH( 123, 456, "yes it works!" )'>Test 3</button>
聽</body>
</html>
LEANDRO AREVALO
Bogot谩 (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com
[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 25.01 ] [ xHarbour 64 bits) ]

