Dear friends,
...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
...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
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 oWebViewoWebView: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 +"'}") ;
    }