Page 6 of 23

Re: PureBasic 6.10 beta 1 - Xmas Release - is out !

Posted: Sun Dec 24, 2023 1:36 pm
by Psychophanta
Uh! Lot of new stuff ready to test!
Thanks to all an merry happy days! :idea:

Re: PureBasic 6.10 beta 1 - Xmas Release - is out !

Posted: Sun Dec 24, 2023 2:12 pm
by jacdelad
I don't care about Christmas. Now I do. Thanks Fred and team!

Re: PureBasic 6.10 beta 1 - Xmas Release - is out !

Posted: Sun Dec 24, 2023 2:52 pm
by thyphoon
Fantastic 🥳Best christmas present 🥰🥰🥰🥰 Thanks Fred and The Pb Team !

Re: PureBasic 6.10 beta 1 - Xmas Release - is out !

Posted: Sun Dec 24, 2023 4:08 pm
by Marc56us
skinkairewalker wrote: Sat Dec 23, 2023 9:01 pm
User_Russian wrote: Sat Dec 23, 2023 8:44 pm I tested the code with WebViewGadget from the first post in Win 7, Win 8 and Win 10, and the window is always empty (gadget is not initialized).
Does anyone have this code working fine?

WebGadget when using a flag #PB_Web_Edge it is also not initialized.
Is this a bug?
I just tested it on Windows 11 and Windows 10 ( It took a few seconds of a white screen due to junky hardware, but it worked fine) .
both worked for me...
Hi,

At home, WebView2 works well (and is used by several programs, including e-mail clients). It works with the WebViewGadget, but not as a flag for the WebGadget.
Why ?
Below is a code with my misuse of the WebViewGadget (but which works) and the correct use of the WebGadget but which doesn't work.
Tested on Windows 10 and Windows 11.
Do you have the same results?

Code: Select all

#URL = "https://www.purebasic.fr"

; Tests on Windows 10 and Windows 11

; Bad usage, but works (I will not use this, just to test WebView2)
OpenWindow   (0,  500,  0, 1000, 300, "WebViewGadget - Bad usage, but works! :o)", #PB_Window_SystemMenu) 
WebViewGadget(0, 10, 10,  980, 280)
*Buf = ReceiveHTTPMemory(#URL)
SetGadgetText(0, PeekS(*Buf, MemorySize(*Buf), #PB_UTF8|#PB_ByteLength))

; Good, but does not work
OpenWindow(1, 500, 350, 1000, 300,"WebGadget with #PB_Web_Edge - Blank page even after minutes... :-(", #PB_Window_SystemMenu)
WebGadget(1, 10, 10, 980, 280, #URL, #PB_Web_Edge)

Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow

Re: PureBasic 6.10 beta 1 - Xmas Release - is out !

Posted: Sun Dec 24, 2023 4:16 pm
by useful

Code: Select all

WebGadget(1, 10, 10, 980, 280, "", #PB_Web_Edge)
SetGadgetText(1, #URL)
It was experimentally obtained that it would work like this.
But it still needs clarification.

Re: PureBasic 6.10 beta 1 - Xmas Release - is out !

Posted: Sun Dec 24, 2023 4:31 pm
by Marc56us
useful wrote: Sun Dec 24, 2023 4:16 pm

Code: Select all

WebGadget(1, 10, 10, 980, 280, "", #PB_Web_Edge)
SetGadgetText(1, #URL)
It was experimentally obtained that it would work like this.
But it still needs clarification.
Thanks Useful! this Works :P

:?: But @Team, is it the right way to use the new flag ?

My tests:

Code: Select all

#URL = "https://www.purebasic.fr"

; Tests on Windows 10 and Windows 11

; Bad usage, but works (I will not use this, just to test WebView2)
OpenWindow   (0,  500,  0, 1000, 300, "WebViewGadget - Bad usage, but works! :o)", #PB_Window_SystemMenu) 
WebViewGadget(0, 10, 10, 980, 280)
*Buf = ReceiveHTTPMemory(#URL)
SetGadgetText(0, PeekS(*Buf, MemorySize(*Buf), #PB_UTF8|#PB_ByteLength))

; Good, but does not work
OpenWindow(1, 500, 350, 1000, 300,"WebGadget without #PB_Web_Edge - OK ", #PB_Window_SystemMenu)
WebGadget(1, 10, 10, 980, 280, #URL)

; Good, but does not work
OpenWindow(2, 500, 700, 1000, 300,"WebGadget with #PB_Web_Edge - Blank page even after minutes... :-(", #PB_Window_SystemMenu)
WebGadget(2, 10, 10, 980, 280, #URL, #PB_Web_Edge)

; Good, but strange usage (thanks useful)
OpenWindow(3, 500, 1050, 1000, 300,"WebGadget with #PB_Web_Edge and then SetGadgetText - Works but is it the way ?", #PB_Window_SystemMenu)
WebGadget(3, 10, 10, 980, 280, "", #PB_Web_Edge)
SetGadgetText(3, #URL)

Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow

Re: PureBasic 6.10 beta 1 - Xmas Release - is out !

Posted: Sun Dec 24, 2023 5:14 pm
by HanPBF
Meanwhile...

Code: Select all

SetGadgetText(4, ~"<script>window.location='" + #URL + "';</script>")

Re: PureBasic 6.10 beta 1 - Xmas Release - is out !

Posted: Sun Dec 24, 2023 7:03 pm
by skywalk
I just noticed support for RaspberryPi ARM32 :shock:
Was this just 6.10 or from an earlier version?

Re: PureBasic 6.10 beta 1 - Xmas Release - is out !

Posted: Mon Dec 25, 2023 1:36 am
by Wolf
Thank you sooo much Fred & Freak 4 Xmas gift :D

Re: PureBasic 6.10 beta 1 - Xmas Release - is out !

Posted: Mon Dec 25, 2023 12:23 pm
by Sicro
Many thanks for the great new release. 8)

Merry Christmas to you all. :D

Re: PureBasic 6.10 beta 1 - Xmas Release - is out !

Posted: Mon Dec 25, 2023 2:54 pm
by mk-soft
skywalk wrote: Sun Dec 24, 2023 7:03 pm I just noticed support for RaspberryPi ARM32 :shock:
Was this just 6.10 or from an earlier version?
Available since version v6.0 for Arm32 and Arm64. But does not only run on Raspberry.
You can also use the Arm64 on MacOS M1/M2 with VM Linux for ARM or other linux arm os.

At least Linux Debian 12 (bookworm) is required for v6.10.
The version v6.0x unfortunately does not run under Arm32 at the moment, because the BindEvent functions no longer work under Linux Debian 11 (bullseye) with the last update, but under Arm64 with Linux Dedian 11 (bullseye).

I hope that there will be an update for PB v6.04 for bullseye (Arm32).

Re: PureBasic 6.10 beta 1 - Xmas Release - is out !

Posted: Tue Dec 26, 2023 8:53 am
by pamen
skinkairewalker wrote: Sat Dec 23, 2023 9:01 pm
User_Russian wrote: Sat Dec 23, 2023 8:44 pm I tested the code with WebViewGadget from the first post in Win 7, Win 8 and Win 10, and the window is always empty (gadget is not initialized).
Does anyone have this code working fine?

WebGadget when using a flag #PB_Web_Edge it is also not initialized.
Is this a bug?
I just tested it on Windows 11 and Windows 10 ( It took a few seconds of a white screen due to junky hardware, but it worked fine) .
both worked for me...
I also cannot get WebGadget with #PB_Web_Edge to work and create a Gadget (isgadget() returns correctly and ID but window does not exists)
Windows 11 with up to date WebView2 distribution: nothing shows
Windows 10 with WebView 2: Nothing
Earlier windows version (Vista, Windows 7, Windows 8) - it should obviously show IE, if WebView2 is not available but it does not.
Also it would be great to know what Browser is running to conditionally use older functions for Javascript, CSS capabilities and key processing

Checking the window I get "PureWebView" window class with CS_REDRAW and HS_REDRAW, but no browser.
I thought it should be a different class - not WebView But Somehting Like PureWebGadget ?

Re: PureBasic 6.10 beta 1 - Xmas Release - is out !

Posted: Tue Dec 26, 2023 9:38 am
by pamen
More.
1. In a simple project WebGadget with webView2 works (with all the issues with setting URL)
But in a complex project with 100 files and 20+ windows - I do not get any WebView - only host window class.
This is not random, I commented out all code doing any tweaks to IE, so the WebGadget is just created, nothing else - and blank, no browser client in the host "PureWebView".

2. File URLs are not accepted for whatever reason at all, see this example, replace filename with you valid html file (Internet settings should allow local files, and this should be default for apps):

Code: Select all

OpenWindow(3, 100, 100, 1000, 500,"WebGadget with #PB_Web_Edge - works only in a simple case", #PB_Window_SystemMenu)
Panel_0 = PanelGadget(#PB_Any, 0, 0, 900, 450)
AddGadgetItem(Panel_0, -1, "HTML")
webview = WebGadget(#PB_Any, 10, 10, 980, 280, "", #PB_Web_Edge) ; only works in simple app with single file, in a project with 20 forms - not working
AddGadgetItem(Panel_0, -1, "Another")
webview2 = WebGadget(#PB_Any, 10, 10, 980, 280, "", #PB_Web_Edge)

fileurl.s = "file://e:\PureBasicProjects\happyHour.html"
fileurl = ReplaceString(fileurl, "\", "/") ; should not be necessary with IE or WebView!
fileurl = URLEncoder(fileurl, #PB_UTF8) ; should not be necessary on Windows, only some MacOS versions
CloseGadgetList()
SetGadgetText(webview, "https://purebasic.com") ; yeah, works, unless specified in gadget creation
SetGadgetText(webview2, fileurl) ; never works, works on Edge and other WebView2 based apps though fine
Quit= 0 
Repeat 
  event = WaitWindowEvent() 
  If Event
    If Event =  #PB_Event_CloseWindow
      Quit = 1
    EndIf
  Else
    Delay(10)
  EndIf
Until Quit

Re: PureBasic 6.10 beta 1 - Xmas Release - is out !

Posted: Wed Dec 27, 2023 10:08 am
by jacdelad
Don't know if this was already cleared up: Are the new dates compatible with the old ones? If not, this would mean serious for all already stored dates.

Re: PureBasic 6.10 beta 1 - Xmas Release - is out !

Posted: Wed Dec 27, 2023 10:35 am
by Little John
jacdelad wrote: Wed Dec 27, 2023 10:08 am Are the new dates compatible with the old ones?
Yes, they are. See freak's message here
https://www.purebasic.fr/english/viewto ... 32#p613332