SpiderBasic 2.40 is out !

Everything else that doesn't fall into one of the other categories.
Fred
Site Admin
Posts: 1506
Joined: Mon Feb 24, 2014 10:51 am

SpiderBasic 2.40 is out !

Post by Fred »

Hello everyone,

- final is out ! Thanks you all for the feedback !

- beta 4 is out, it includes AAB (Android App Bundle) package creation and some fixes to be able to publish on Google Play. I tried it and it works as expected. An AAB package will be now automatically generated when creating an Android app which is not in debug mode. Feel free to test it to see if it works as expected ! If you want to test the app I published, use this link: https://play.google.com/apps/internalte ... 7859621339 and send me your email in PM.

- beta 3 is out, it includes the final doc for all new stuffs, a few fixes and a few new commands:

Code: Select all

DesktopResolutionX(), DesktopResolutionY(), DesktopScaledX(), DesktopScaledY(), DesktopUnscaledX(), DesktopUnscaledY()
- beta 2 is available, it fixes a lot of (old) bugs and bring a few more new stuffs:

Code: Select all

- Added #PB_EventType_Focus and #PB_EventType_LostFocus to TreeGadget()
- Added #PB_Tree_Expanded support to SetGadgetAttribute() for TreeGadget() to quickly expand/collapse all nodes
- Added HighAccuracy parameter to StartGeolocation() to use the real GPS if available.
- Added #PB_ListIcon_GridLines support

- Updated: android framework to android-32 to be able to publish app on Google PlayStore
- Updated: the application license file
First, I would like to apologize for the very big delay since the last official release. Some of you already know it, I wanted to finish the 6.00 version of PureBasic which was a very big undertaking and it took longer than expected. To make it up to you, for all users which had subscribed to a one year extension (at any time in the past), I decided to renew it freely up to 31. dec 2023 so you can access the new versions.

Now, back on the new release which brings some interesting changes and new features (including the bug fixes from the 2.32 beta version):

Code: Select all

- Added WebSocket library: OpenWebSocket(), CloseWebSocket(), SendWebSocketData(), SendWebSocketString()
- Added Packer library: CompressMemory(), UncompressMemory(), CompressString(), UncompressString()
- Added Clipboard library: SetClipboardText()
- Added Event(), EventString(), EventWebSocket()
- Added FormatNumber()
- Added Base64Encoder(), Base64Decoder(), Base64EncoderBuffer(), Base64DecoderBuffer()
- Changed the behaviour of GetMapElement(), it now always creates a new element if not found.
- StrD will switch to exponent notation if too big (> e+21)
- Added a timestamp to the index.html to avoid caching problem
- Added native OS X arm64 version
- Added all IDE improvement from PureBasic
Here is an example for the WebSocket lib (with some compressed data as well):

Code: Select all

Procedure Events()
  Select Event()
    Case #PB_Event_Gadget
          
      Select EventGadget()
        Case 0
          SendWebSocketString(2, "Hello !")
                    
        Case 1
          *Buffer = AllocateMemory(100)
          PokeA(*Buffer, 0, 25)
          PokeA(*Buffer, 10, 26)
          
          ;SendWebSocketData(2, *Buffer) ; Send the whole buffer (100 bytes)
          ;SendWebSocketData(2, *Buffer, 10, 20) ; Send only a part of the buffer (20 bytes starting from 10)
          
          ; *Compressed = CompressMemory(*Buffer)
          
          *Compressed = CompressString("Test "+Space(1000)+"End")
          Debug "Compressed size (from 1000 bytes): "+MemorySize(*Compressed)
          SendWebSocketData(2, *Compressed)
                    
      EndSelect
  
    Case #PB_Event_WebSocket
      
      Select EventType()
        Case #PB_EventType_Connected
          Debug "WebSocket #" + EventWebSocket() + " connected."
          
        Case #PB_EventType_Closed
          Debug "WebSocket #" + EventWebSocket() + " closed."
          
        Case #PB_EventType_String
          Debug "String recieved on WebSocket #" + EventWebSocket() + "."
          Debug "String content: " + EventString()
      
        Case #PB_EventType_Data
          Debug "Data recieved on WebSocket #" + EventWebSocket() + "."
          *Buffer = EventData()
          Debug "Data size: " + MemorySize(*Buffer) + ". First byte: " + PeekA(*Buffer, 0)
          
          ; *Uncompressed = UncompressMemory(*Buffer)
          ;Debug MemorySize(*Uncompressed)
          ;Debug PeekA(*Uncompressed, 0)
          
          Result$ = UncompressString(*Buffer)
          Debug Result$
          
          FreeMemory(*Buffer)
          
        Case #PB_EventType_Error
          Debug "Error on WebSocket #" + EventWebSocket() + "."
      EndSelect
  EndSelect
  
EndProcedure

BindEvent(#PB_Event_Gadget, @Events())
BindEvent(#PB_Event_WebSocket, @Events())

OpenWindow(0, 100, 100, 500, 100, "WebSocket test")
ButtonGadget(0, 10, 10, 200, 30, "Send string !")
ButtonGadget(1, 10, 45, 200, 30, "Send Data !")

If OpenWebSocket(2, "ws://127.0.0.1:8090/")
  Debug "Trying to open the websocket"
Else
  Debug "Web socket not supported."
EndIf
To test it easily, if you have PureBasic you can download this: https://github.com/Dadido3/WebSocket_Server (click on the green "Code" button -> "download as zip") which is an excellent websocket server implementation in PB, and run the Fuzzy/Fuzzy_Server.pb file, it should work out of the box.

Have fun !

The Fantaisie Software Team
hoerbie
Posts: 100
Joined: Sun Mar 17, 2019 5:51 pm
Location: DE/BY/MUC

Re: SpiderBasic 2.40 beta 1 is ready !

Post by hoerbie »

Great news before the weekend, thanks a lot!

What are the further plans? Any bugfixes?
Fred
Site Admin
Posts: 1506
Joined: Mon Feb 24, 2014 10:51 am

Re: SpiderBasic 2.40 beta 1 is ready !

Post by Fred »

yes, bug fixes during beta time.
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: SpiderBasic 2.40 beta 1 is ready !

Post by Peter »

8-) Very cool! Thanks for the Update, Fred!

A small note about the WebSocket. You can also use free echo server for tests, which sends the sent data back again.
For example:

Code: Select all

If OpenWebSocket(2, "wss://ws.postman-echo.com/raw")
[...]
// Addendum: It seems that postman-echo does not like SendWebSocketData(). The connection is then terminated. SendWebSocketString(), however, works as expected.
Fred
Site Admin
Posts: 1506
Joined: Mon Feb 24, 2014 10:51 am

Re: SpiderBasic 2.40 beta 1 is ready !

Post by Fred »

Nice to know !
plouf
Posts: 194
Joined: Tue Feb 25, 2014 6:01 pm
Location: Athens,Greece

Re: SpiderBasic 2.40 beta 1 is ready !

Post by plouf »

Very nice to see updates :)

websocket is very nice feature.. and moer "raw tcp" data definitelly neeed in modern age :)

not to be Greedy but except new commands, update in core system, specially in android building, needed
problem in building app and new aab in PlayStore needed ;-)
Christos
User avatar
useful
Posts: 116
Joined: Tue Feb 25, 2014 1:15 pm

Re: SpiderBasic 2.40 beta 1 is ready !

Post by useful »

That's great news!
Clarification: dojo and cordova remain in the base?
2B or not 2B = FF
bembulak
Posts: 71
Joined: Wed Feb 26, 2014 9:53 am

Re: SpiderBasic 2.40 beta 1 is ready !

Post by bembulak »

Great news! Thank you. Purchased today, downloaded 2.40 beta 1 and testing right now.
Joubarbe
Posts: 12
Joined: Fri Sep 25, 2020 1:35 pm

Re: SpiderBasic 2.40 beta 1 is ready !

Post by Joubarbe »

Any plan to improve the creation process of Android apps?
Fred
Site Admin
Posts: 1506
Joined: Mon Feb 24, 2014 10:51 am

Re: SpiderBasic 2.40 beta 1 is ready !

Post by Fred »

What do you have in mind ?
Post Reply