Page 1 of 1

this doc Example compile with debugger out: ERROR

Posted: Sat Mar 30, 2024 12:32 am
by gurj
this doc Example compile with debugger out: ERROR
win7x86 pb6.10LTS
why:
"compile without debugger " is ok!
"compile with debugger " is ERROR!
line9:SetGadgetItemText(0, #PB_WebView_HtmlCode, Html$)
[06:53:51] [ERROR] The specified #Gadget is not initialised.

WebViewGadget doc:
Example: with disabled right-click menu

Code: Select all

  Html$ = ~"<html style=\"margin:0px;height:100%;width:100%\">"+
          ~"<body oncontextmenu=\"return false;\" style=\"margin:0px;min-height:100%;width:100%\">"+
          ~"<button id=\"displayInfo\">Display Info</button>"+
          ~"</body></html>\n"
  
  OpenWindow(0, 100, 100, 400, 400, "No right click UI", #PB_Window_SystemMenu)

  WebViewGadget(0, 0, 0, 400, 400)
  SetGadgetItemText(0, #PB_WebView_HtmlCode, Html$)

  Repeat 
    Event = WaitWindowEvent()
  Until Event = #PB_Event_CloseWindow

Re: this doc Example compile with debugger out: ERROR

Posted: Sat Mar 30, 2024 12:55 am
by gurj
change to WebGadget and #PB_Web_HtmlCode is ok

Re: this doc Example compile with debugger out: ERROR

Posted: Sat Mar 30, 2024 3:50 am
by mk-soft
No problem here

Whats OS?

Re: this doc Example compile with debugger out: ERROR

Posted: Sat Mar 30, 2024 3:58 am
by Quin
mk-soft wrote: Sat Mar 30, 2024 3:50 am Whats OS?
gurj wrote: Sat Mar 30, 2024 12:32 am win7x86 pb6.10LTS
That said though, I also see no problem on Windows 10 (64-bit), PB 6.10 LTS.

Re: this doc Example compile with debugger out: ERROR

Posted: Sat Mar 30, 2024 4:26 am
by gurj
thanks!
and:use WebViewGadget and without debugger isnot ok also,because no show button:"Display Info"
sorry,streamlined system:win7+net3.5=2GB

Re: this doc Example compile with debugger out: ERROR

Posted: Sat Mar 30, 2024 4:31 am
by gurj
I guess,may need edge brower

Re: this doc Example compile with debugger out: ERROR

Posted: Sat Mar 30, 2024 5:43 am
by gurj
pb help doc:
The WebView gadget is leveraging the built-in OS web components (WebView2 on Windows, WebKit-GTK on Linux/Raspberry and WebKit on macOS). On Windows 10 and above, no additional component is required but if older Windows support is needed, the WebView2 redistributable might need to be installed: distribution guide
----------------------
is this:
https://learn.microsoft.com/en-us/micro ... stribution

Re: this doc Example compile with debugger out: ERROR

Posted: Sat Mar 30, 2024 8:05 am
by juergenkulow
Linux Mint 21 Cinnamon 5.4.12 Warning on Terminal:

Code: Select all

libEGL warning: egl: failed to create dri2 screen

Re: this doc Example compile with debugger out: ERROR

Posted: Sat Mar 30, 2024 1:13 pm
by mk-soft
Works here with
- Windows 10 Pro 22H2 PB x86, x64
- Mint Linux LMDE 6 x64
- Ubuntu 22.04 x64
- macOS (Intel)