PureBasic 6.00 released !

Developed or developing a new product in PureBasic? Tell the world about it.
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 6.00 Beta 9 released !

Post by Fred »

OK for the HttpTimeout() function, will reduce the number of optional param for HttpRequest() which is already big.
User avatar
RichAlgeni
Addict
Addict
Posts: 914
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: PureBasic 6.00 Beta 9 released !

Post by RichAlgeni »

Maybe the command could be named differently? Such as HTTPRequestE. Adding 'E' to the end, to show it is the Enhanced command, for instance?
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Re: PureBasic 6.00 Beta 9 released !

Post by Marc56us »

RichAlgeni wrote: Sun Jun 05, 2022 8:33 pm Maybe the command could be named differently? Such as HTTPRequestE. Adding 'E' to the end, to show it is the Enhanced command, for instance?
Timeout in B9 is not only used in HTTPRequest() but also in ReceiveHTTPFile(), ReceiveHTTPMemory(), HTTPRequestMemory()
(see statusbar when click on one of them)
So HttpTimeout(<value>) will work for all and need only one command.
:wink:
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: PureBasic 6.00 Beta 9 released !

Post by infratec »

In my version I simply added the Timeout parameter as last optional parameter.
So no change to available code is needed. Only if you need the parameter.
You can use #Null for Header() map if not used.
User avatar
DeanH
Enthusiast
Enthusiast
Posts: 223
Joined: Wed May 07, 2008 4:57 am
Location: Adelaide, South Australia
Contact:

Re: PureBasic 6.00 Beta 9 released !

Post by DeanH »

My original idea was to use HttpTimeout to set and change as needed.

What about having both a HttpTimeout function and an optional parameter at the end of the HttpRequests? That provides maximum flexibility without breaking code.
User avatar
griz
Enthusiast
Enthusiast
Posts: 167
Joined: Sun Jun 29, 2003 7:32 pm
Location: Canada

Re: PureBasic 6.00 Beta 9 released !

Post by griz »

DesktopWidth() and DesktopHeight() are returning 1920x1080 even though I am running 4K. Ubuntu 20.04.

Really happy to see all this hard work on Pure Basic. Thank you!
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 6.00 Beta 10 released !

Post by Fred »

Beta 10 is available, with some more some improvements:

Code: Select all

- Added: HTTPTimeout() for HttpRequest commands (reverted the changes from beta 9)
User avatar
DeanH
Enthusiast
Enthusiast
Posts: 223
Joined: Wed May 07, 2008 4:57 am
Location: Adelaide, South Australia
Contact:

Re: PureBasic 6.00 Beta 10 released !

Post by DeanH »

Thank you very much, Fred! I appreciate the promptness.
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: PureBasic 6.00 Beta 10 released !

Post by ChrisR »

Thank you Fred and the team for all the hard work.
I hope we are approaching the final version with the changelog shrinking.

Is it possible to automatically add the C compiler in the settings, instead of adding it manually at each beta ?
User avatar
jacdelad
Addict
Addict
Posts: 1432
Joined: Wed Feb 03, 2021 12:46 pm
Location: Planet Riesa
Contact:

Re: PureBasic 6.00 Beta 10 released !

Post by jacdelad »

Just out of curiosity: How does HTTPTimeout work with threads? Separate values or one value? Also, does it return the previous timeout?
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 6.00 Beta 10 released !

Post by Fred »

It's one value for the whole app, not per thread. It doesn't return the previous timeout.
User_Russian
Addict
Addict
Posts: 1443
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: PureBasic 6.00 Beta 10 released !

Post by User_Russian »

Fred wrote: Mon Jun 13, 2022 9:50 amIt's one value for the whole app, not per thread.
It is necessary to write about in help.
And for other functions that do not support multithreading, you also need to write in help. To let people know what can't be used in multiple threads.
User avatar
jacdelad
Addict
Addict
Posts: 1432
Joined: Wed Feb 03, 2021 12:46 pm
Location: Planet Riesa
Contact:

Re: PureBasic 6.00 Beta 10 released !

Post by jacdelad »

@Fred: Maybe it's a good idea to get the previous timeout as return value, or by passing special value (like 0 for default and -1 for getting the now set value).
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
User avatar
DeanH
Enthusiast
Enthusiast
Posts: 223
Joined: Wed May 07, 2008 4:57 am
Location: Adelaide, South Australia
Contact:

Re: PureBasic 6.00 Beta 10 released !

Post by DeanH »

Good idea to get the current timeout. Maybe the same function but with a constant that tells the function to return a timeout value rather than set one. CurrentTimeOut = HTTPTimeout(#Pb_Any) or another constant? Or another function? HTTPGetTimeout() ?
plouf
Enthusiast
Enthusiast
Posts: 250
Joined: Fri Apr 25, 2003 6:35 pm
Location: Athens,Greece

Re: PureBasic 6.00 Beta 10 released !

Post by plouf »

isnt that easy to "remember" using a global variable ?

i.e

global httptimeoutvalue.l

httptimeoutvalue =100
HttpTimeout(httptimeoutvalue)


httptimeoutvalue =500
HttpTimeout(httptimeoutvalue)

...
Christos
Post Reply