...PLEASE could someone be so kind as to help me with the bOnBind codeblock. Does it accept IF ... ENDIF?
The code i post here compiles perfectly, but then I add IF ... ENDIF and it errors. Maybe my syntax is wrong. Any help would be greatly appreciated.
Very kind regards to all and thanks a lot in advance,
Ruth
- Code: Select all Expand view RUN
- function webshow(console, hWnd, nlink, cHtmlContent)
local hPost
local cHtmlOrUrl := Curdrive() + ":\" + Curdir() + "\ini_buc.html"
local cTest := "Ruth"
if Empty(oWebView)
oWebView := TWebView():New(, hWnd)
oWebView:bOnBind := { | cJson, cCalls | ;
MsgInfo(cJson),;
MsgInfo(cCalls),;
hb_jsondecode(cJson, @hPost), ;
MsgInfo("Decoded JSON hash: " + hPost[1]),;
oWebView:Return(cCalls, 0, "{ 'result': '"+ cTest +"'}") ;
}
oWebView:Bind("SendToFWH")
oWebView:Navigate(cHtmlOrUrl)
oWebView:SetTitle("Edit INI File")
oWebView:Run()
oWebView:Destroy()
endif
return oWebView
- Code: Select all Expand view RUN
- oWebView:bOnBind := { | cJson, cCalls | ;
MsgInfo(cJson),;
MsgInfo(cCalls),;
if hb_jsondecode(cJson, @hPost), ;
MsgInfo("Decoded JSON hash: " + hPost[1]),;
endif,;
oWebView:Return(cCalls, 0, "{ 'result': '"+ cTest +"'}") ;
}